broken default param fix
This commit is contained in:
parent
88a140e897
commit
528abb73a4
14
dist/rage-rpc.d.ts
vendored
14
dist/rage-rpc.d.ts
vendored
@ -2,13 +2,13 @@ export as namespace rpc;
|
||||
|
||||
export function register(name: string, cb: ProcedureListener): void;
|
||||
export function unregister(name: string): void;
|
||||
export function call<T = any>(name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function callServer<T = any>(name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function callClient<T = any>(player: Player, name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function callClient<T = any>(name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function callBrowsers<T = any>(player: Player, name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function callBrowsers<T = any>(name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function callBrowser<T = any>(browser: Browser, name: string, args?: any, options: CallOptions = {}): Promise<T>;
|
||||
export function call<T = any>(name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
export function callServer<T = any>(name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
export function callClient<T = any>(player: Player, name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
export function callClient<T = any>(name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
export function callBrowsers<T = any>(player: Player, name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
export function callBrowsers<T = any>(name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
export function callBrowser<T = any>(browser: Browser, name: string, args?: any, options?: CallOptions): Promise<T>;
|
||||
|
||||
export function on(name: string, cb: ProcedureListener): void;
|
||||
export function off(name: string, cb: ProcedureListener): void;
|
||||
|
2
dist/rage-rpc.min.js
vendored
2
dist/rage-rpc.min.js
vendored
File diff suppressed because one or more lines are too long
1725
package-lock.json
generated
1725
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -360,7 +360,7 @@ function _callBrowsers(player: Player, name: string, args?: any, extraData: any
|
||||
* @param options - Any options.
|
||||
* @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 extraData: any = {};
|
||||
|
||||
@ -397,7 +397,7 @@ export function callBrowsers(player: Player | string, name?: string | any, args?
|
||||
* @param options - Any options.
|
||||
* @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(arguments.length < 2 || arguments.length > 4) return util.promiseReject('callBrowser expects 2 to 4 arguments: "browser", "name", optional "args", and optional "options"');
|
||||
|
||||
|
Reference in New Issue
Block a user