Allow user to specify type of returned values

This commit is contained in:
Yiin 2019-03-30 00:37:43 +02:00 committed by GitHub
parent 1dc43b87be
commit 37309e3204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
dist/rage-rpc.d.ts vendored
View File

@ -2,13 +2,13 @@ export as namespace rpc;
export function register(name: string, cb: ProcedureListener): void; export function register(name: string, cb: ProcedureListener): void;
export function unregister(name: string): void; export function unregister(name: string): void;
export function call(name: string, args?: any): Promise<any>; export function call<T = any>(name: string, args?: any): Promise<T>;
export function callServer(name: string, args?: any): Promise<any>; export function callServer<T = any>(name: string, args?: any): Promise<T>;
export function callClient(player: Player, name: string, args?: any): Promise<any>; export function callClient<T = any>(player: Player, name: string, args?: any): Promise<T>;
export function callClient(name: string, args?: any): Promise<any>; export function callClient<T = any>(name: string, args?: any): Promise<T>;
export function callBrowsers(player: Player, name: string, args?: any): Promise<any>; export function callBrowsers<T = any>(player: Player, name: string, args?: any): Promise<T>;
export function callBrowsers(name: string, args?: any): Promise<any>; export function callBrowsers<T = any>(name: string, args?: any): Promise<T>;
export function callBrowser(browser: Browser, name: string, args?: any): Promise<any>; export function callBrowser<T = any>(browser: Browser, name: string, args?: any): Promise<T>;
export interface Player { export interface Player {
call: (eventName: string, args?: any[]) => void; call: (eventName: string, args?: any[]) => void;