Revert parameter changes for call options

This commit is contained in:
micah 2019-11-02 15:11:02 -04:00
parent 47430492e6
commit 206836248d
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -360,7 +360,7 @@ function _callBrowsers(player: Player, name: string, args?: any, extraData: any
* @param options - Any options. * @param options - Any options.
* @returns The result from the procedure. * @returns The result from the procedure.
*/ */
export function callBrowsers(player: Player | string, name?: string | any, args?: any, options?: CallOptions): Promise<any> { export function callBrowsers(player: Player | string, name?: string | any, args?: any, options: CallOptions = {}): Promise<any> {
let promise; let promise;
let extraData: any = {}; let extraData: any = {};
@ -397,7 +397,7 @@ export function callBrowsers(player: Player | string, name?: string | any, args?
* @param options - Any options. * @param options - Any options.
* @returns The result from the procedure. * @returns The result from the procedure.
*/ */
export function callBrowser(browser: Browser, name: string, args?: any, options?: CallOptions): Promise<any> { export function callBrowser(browser: Browser, name: string, args?: any, options: CallOptions = {}): Promise<any> {
if(environment !== 'client') return util.promiseReject('callBrowser can only be used in the client environment'); if(environment !== 'client') return util.promiseReject('callBrowser can only be used in the client environment');
if(arguments.length < 2 || arguments.length > 4) return util.promiseReject('callBrowser expects 2 to 4 arguments: "browser", "name", optional "args", and optional "options"'); if(arguments.length < 2 || arguments.length > 4) return util.promiseReject('callBrowser expects 2 to 4 arguments: "browser", "name", optional "args", and optional "options"');