Merge pull request #6 from Yiin/patch-2

Allow user to specify type of returned values
This commit is contained in:
Micah Allen 2019-03-29 18:41:57 -04:00 committed by GitHub
commit 465c6cc732
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;