Skip to content

Commit 43f2764

Browse files
committed
publish: output for 22732c9
1 parent fd74d18 commit 43f2764

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

dist/index.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
declare interface BrowserMp {
1+
declare interface Browser {
22
url: string;
33
execute: (code: string) => void;
44
[property: string]: any;
55
}
66

7-
declare interface PlayerMp {
7+
declare interface Player {
88
call: (eventName: string, args?: any[]) => void;
99
[property: string]: any;
1010
}
1111

1212
export declare type ProcedureListener = (args: any, info: ProcedureListenerInfo) => any;
1313

14-
export declare interface ProcedureListenerInfo {
14+
export declare interface ProcedureListenerInfo<T = any, K = any> {
1515
environment: string;
1616
id?: string;
17-
player?: PlayerMp;
18-
browser?: BrowserMp;
17+
player?: T;
18+
browser?: K;
1919
}
2020

2121
/**
@@ -41,7 +41,7 @@ export declare function call<T = any>(name: string, args?: any, options?: CallOp
4141
* @param options - Any options.
4242
* @returns The result from the procedure.
4343
*/
44-
export declare function callBrowser<T = any>(browser: BrowserMp, name: string, args?: any, options?: CallOptions): Promise<T>;
44+
export declare function callBrowser<T = any>(browser: Browser, name: string, args?: any, options?: CallOptions): Promise<T>;
4545

4646
/**
4747
* Calls a remote procedure registered in any browser context.
@@ -55,7 +55,7 @@ export declare function callBrowser<T = any>(browser: BrowserMp, name: string, a
5555
* @returns The result from the procedure.
5656
*/
5757
export declare function callBrowsers<T = any>(name: string, args?: any, options?: CallOptions): Promise<T> | undefined;
58-
export declare function callBrowsers<T = any>(player: PlayerMp, name: string, args?: any, options?: CallOptions): Promise<T> | undefined;
58+
export declare function callBrowsers<T = any>(player: Player, name: string, args?: any, options?: CallOptions): Promise<T> | undefined;
5959

6060
/**
6161
* Calls a remote procedure registered on the client.
@@ -69,7 +69,7 @@ export declare function callBrowsers<T = any>(player: PlayerMp, name: string, ar
6969
* @returns The result from the procedure.
7070
*/
7171
export declare function callClient<T = any>(name: string, args?: any, options?: CallOptions): Promise<T>;
72-
export declare function callClient<T = any>(player: PlayerMp, name: string, args?: any, options?: CallOptions): Promise<T>;
72+
export declare function callClient<T = any>(player: Player, name: string, args?: any, options?: CallOptions): Promise<T>;
7373

7474
export declare interface CallOptions {
7575
timeout?: number;
@@ -132,7 +132,7 @@ export declare function trigger(name: string, args?: any): void;
132132
* @param name - The name of the event.
133133
* @param args - Any parameters for the event.
134134
*/
135-
export declare function triggerBrowser(browser: BrowserMp, name: string, args?: any): void;
135+
export declare function triggerBrowser(browser: Browser, name: string, args?: any): void;
136136

137137
/**
138138
* Triggers an event registered in any browser context.
@@ -144,7 +144,7 @@ export declare function triggerBrowser(browser: BrowserMp, name: string, args?:
144144
* @param args - Any parameters for the event.
145145
*/
146146
export declare function triggerBrowsers(name: string, args?: any): void;
147-
export declare function triggerBrowsers(player: PlayerMp, name: string, args?: any): void;
147+
export declare function triggerBrowsers(player: Player, name: string, args?: any): void;
148148

149149
/**
150150
* Triggers an event registered on the client.
@@ -156,7 +156,7 @@ export declare function triggerBrowsers(player: PlayerMp, name: string, args?: a
156156
* @param args - Any parameters for the event.
157157
*/
158158
export declare function triggerClient(name: string, args?: any): void;
159-
export declare function triggerClient(player: PlayerMp, name: string, args?: any): void;
159+
export declare function triggerClient(player: Player, name: string, args?: any): void;
160160

161161
/**
162162
* Triggers an event registered on the server.

0 commit comments

Comments
 (0)