From 6d0bb48b68a2f35676ef4246ae4165bf242232cd Mon Sep 17 00:00:00 2001 From: Sadret Date: Mon, 31 Jan 2022 19:49:02 +0100 Subject: [PATCH] [#16251] mark 'callback' argument of [query|execute]Action as optional (#16563) --- distribution/changelog.txt | 1 + distribution/openrct2.d.ts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 6161eacd16..6035866e3d 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -17,6 +17,7 @@ - Improved: [#10150] Ride stations are now properly checked if they’re sheltered. - Improved: [#10664, #16072] Visibility status can be modified directly in the Tile Inspector's list. - Improved: [#16251] Plugin API handles null values better. +- Improved: [#16251] openrct2.d.ts: mark 'callback' argument of queryAction and executeAction as optional. - Improved: [#16258] Increased image limit in the engine. - Improved: [#16408] Improve --version cli option to report more compatibility information. - Change: [#16077] When importing SV6 files, the RCT1 land types are only added when they were actually used. diff --git a/distribution/openrct2.d.ts b/distribution/openrct2.d.ts index 0c3f09c198..9ae1e5535e 100644 --- a/distribution/openrct2.d.ts +++ b/distribution/openrct2.d.ts @@ -241,8 +241,8 @@ declare global { * @param args The action parameters. * @param callback The function to be called with the result of the action. */ - queryAction(action: ActionType, args: object, callback: (result: GameActionResult) => void): void; - queryAction(action: string, args: object, callback: (result: GameActionResult) => void): void; + queryAction(action: ActionType, args: object, callback?: (result: GameActionResult) => void): void; + queryAction(action: string, args: object, callback?: (result: GameActionResult) => void): void; /** * Executes a game action. In a network game, this will send a request to the server and wait @@ -251,8 +251,8 @@ declare global { * @param args The action parameters. * @param callback The function to be called with the result of the action. */ - executeAction(action: ActionType, args: object, callback: (result: GameActionResult) => void): void; - executeAction(action: string, args: object, callback: (result: GameActionResult) => void): void; + executeAction(action: ActionType, args: object, callback?: (result: GameActionResult) => void): void; + executeAction(action: string, args: object, callback?: (result: GameActionResult) => void): void; /** * Subscribes to the given hook.