Archived
Add noRet option
This commit is contained in:
Vendored
+12
-7
@@ -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): Promise<T>;
|
||||
export function callServer<T = any>(name: string, args?: any): Promise<T>;
|
||||
export function callClient<T = any>(player: Player, name: string, args?: any): Promise<T>;
|
||||
export function callClient<T = any>(name: string, args?: any): Promise<T>;
|
||||
export function callBrowsers<T = any>(player: Player, name: string, args?: any): Promise<T>;
|
||||
export function callBrowsers<T = any>(name: string, args?: any): Promise<T>;
|
||||
export function callBrowser<T = any>(browser: Browser, name: string, args?: any): 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 interface Player {
|
||||
call: (eventName: string, args?: any[]) => void;
|
||||
@@ -26,4 +26,9 @@ export interface ProcedureListenerInfo {
|
||||
player?: Player;
|
||||
}
|
||||
|
||||
export interface CallOptions {
|
||||
timeout?: number;
|
||||
noRet?: boolean;
|
||||
}
|
||||
|
||||
export type ProcedureListener = (args: any, info: ProcedureListenerInfo) => any;
|
||||
|
||||
Vendored
+135
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user