@cybermp/client-types 2.2.2 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/out/bitfields.ts +47 -47
- package/out/enums.ts +13899 -13899
- package/package.json +12 -3
- package/precomputed/cef.d.ts +24 -24
- package/precomputed/commands.d.ts +17 -0
- package/precomputed/discord.d.ts +20 -3
- package/precomputed/enums.ts +47 -47
- package/precomputed/events.d.ts +224 -234
- package/precomputed/game.d.ts +601 -558
- package/precomputed/local-storage.d.ts +37 -37
- package/precomputed/local.d.ts +106 -0
- package/precomputed/meta.d.ts +78 -78
- package/precomputed/mp.d.ts +106 -305
- package/precomputed/network.d.ts +81 -0
- package/precomputed/voice-chat.d.ts +86 -86
package/precomputed/events.d.ts
CHANGED
|
@@ -1,234 +1,224 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Map of core multiplayer engine events triggered by the client runtime environment.
|
|
3
|
-
* Covers resource lifecycles, network streaming updates, and entity synchronization.
|
|
4
|
-
* @category Events
|
|
5
|
-
*/
|
|
6
|
-
interface MpEventsMap {
|
|
7
|
-
/**
|
|
8
|
-
* Fired when any local resource begins initialization and starts running.
|
|
9
|
-
* @param resourceName - The unique identification name of the started resource.
|
|
10
|
-
*/
|
|
11
|
-
anyResourceStart(resourceName: string): void;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Fired when any local resource is explicitly terminated or reloaded.
|
|
15
|
-
* @param resourceName - The unique identification name of the stopped resource.
|
|
16
|
-
*/
|
|
17
|
-
anyResourceStop(resourceName: string): void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Fired when the server signals that a server-side resource has started.
|
|
21
|
-
* @param resourceName - The unique identification name of the server resource.
|
|
22
|
-
*/
|
|
23
|
-
anyServerResourceStart(resourceName: string): void;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Fired when the server signals that a server-side resource has stopped running.
|
|
27
|
-
* @param resourceName - The unique identification name of the server resource.
|
|
28
|
-
*/
|
|
29
|
-
anyServerResourceStop(resourceName: string): void;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Fired specifically when *this* individual script resource completes loading.
|
|
33
|
-
*/
|
|
34
|
-
resourceStart(): void;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Fired specifically when *this* individual script resource is being shut down.
|
|
38
|
-
*/
|
|
39
|
-
resourceStop(): void;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Fired when the engine re-scans and refreshes the global resource manifest map.
|
|
43
|
-
*/
|
|
44
|
-
resourcesRefresh(): void;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Fired when a synchronized game object leaves the local player's streaming radius.
|
|
48
|
-
* @param netID - The network-assigned entity identification hash.
|
|
49
|
-
* @param gameID - The native engine entity handling index ID.
|
|
50
|
-
*/
|
|
51
|
-
objectStreamOut(netID: number, gameID: number): void;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Fired when a synchronized game object enters the local player's streaming radius.
|
|
55
|
-
* @param netID - The network-assigned entity identification hash.
|
|
56
|
-
* @param gameID - The native engine entity handling index ID.
|
|
57
|
-
*/
|
|
58
|
-
objectStreamIn(netID: number, gameID: number): void;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Fired when a synchronized pedestrian or NPC leaves the local player's streaming radius.
|
|
62
|
-
* @param netID - The network-assigned entity identification hash.
|
|
63
|
-
* @param gameID - The native engine entity handling index ID.
|
|
64
|
-
*/
|
|
65
|
-
pedStreamOut(netID: number, gameID: number): void;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Fired when a synchronized pedestrian or NPC enters the local player's streaming radius.
|
|
69
|
-
* @param netID - The network-assigned entity identification hash.
|
|
70
|
-
* @param gameID - The native engine entity handling index ID.
|
|
71
|
-
*/
|
|
72
|
-
pedStreamIn(netID: number, gameID: number): void;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Fired when a remote network player leaves the local user's streaming zone.
|
|
76
|
-
* @param netID - The network-assigned player synchronization ID.
|
|
77
|
-
* @param gameID - The native engine entity handling index ID.
|
|
78
|
-
*/
|
|
79
|
-
remotePlayerStreamOut(netID: number, gameID: number): void;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Fired when a remote network player enters the local user's streaming zone.
|
|
83
|
-
* @param netID - The network-assigned player synchronization ID.
|
|
84
|
-
* @param gameID - The native engine entity handling index ID.
|
|
85
|
-
*/
|
|
86
|
-
remotePlayerStreamIn(netID: number, gameID: number): void;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Fired when a synchronized vehicle leaves the local player's streaming radius.
|
|
90
|
-
* @param netID - The network-assigned entity identification hash.
|
|
91
|
-
* @param gameID - The native engine entity handling index ID.
|
|
92
|
-
*/
|
|
93
|
-
vehicleStreamOut(netID: number, gameID: number): void;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Fired when a synchronized vehicle enters the local player's streaming radius.
|
|
97
|
-
* @param netID - The network-assigned entity identification hash.
|
|
98
|
-
* @param gameID - The native engine entity handling index ID.
|
|
99
|
-
*/
|
|
100
|
-
vehicleStreamIn(netID: number, gameID: number): void;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Payload structure capturing diagnostic crash or layout execution data when a CEF frame fails to load.
|
|
105
|
-
* @category Events
|
|
106
|
-
*/
|
|
107
|
-
type CefLoadingFailedError = {
|
|
108
|
-
/** The name identifier of the target frame window container. */
|
|
109
|
-
frameName: string;
|
|
110
|
-
/** Detailed failure description or engine reason statement. */
|
|
111
|
-
message: string;
|
|
112
|
-
/** File path URL source location string. */
|
|
113
|
-
source: string;
|
|
114
|
-
/** Line number coordinate mapping source code where compilation or loading dropped. */
|
|
115
|
-
line: string;
|
|
116
|
-
/** Column horizontal offset coordinate location. */
|
|
117
|
-
column: string;
|
|
118
|
-
/** Raw interpreter trace log array stack layout details. */
|
|
119
|
-
stack: string;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Map containing standard event listeners bound to web context layers (Chromium Embedded Framework).
|
|
124
|
-
* @category Events
|
|
125
|
-
*/
|
|
126
|
-
interface MpCefEventsMap {
|
|
127
|
-
/**
|
|
128
|
-
* Fired when a target browser instance finishes parsing the document structure tree.
|
|
129
|
-
* @param name - Unique registration name tracking the browser frame entity.
|
|
130
|
-
*/
|
|
131
|
-
domReady(name: string): void;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Fired if the underlying browser layer drops connectivity or triggers initialization errors.
|
|
135
|
-
* @param error - The comprehensive failure metadata payload context object.
|
|
136
|
-
*/
|
|
137
|
-
loadingFailed(error: CefLoadingFailedError): void;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Primary multi-target Event Emitter interface for managing client, server, and CEF bridge communications.
|
|
142
|
-
* Handles binding event listeners, deregistering handlers, and dispatching payloads across contexts.
|
|
143
|
-
* @category Events
|
|
144
|
-
*/
|
|
145
|
-
export interface MpEvents {
|
|
146
|
-
/**
|
|
147
|
-
* Dispatches a local event across the client resource scope.
|
|
148
|
-
* @param eventName - The target event channel identifier.
|
|
149
|
-
* @param args - Arbitrary payload arguments passed to active handlers.
|
|
150
|
-
*/
|
|
151
|
-
emit(eventName: string, ...args: any[]): void;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Encapsulates and forwards an event payload across the network socket layer directly to the server host.
|
|
155
|
-
* @param eventName - Target string channel matching server-side listeners.
|
|
156
|
-
* @param args - Data variables to serialize and stream over the network.
|
|
157
|
-
*/
|
|
158
|
-
emitServer(eventName: string, ...args: any[]): void;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Forwards a tracking event bridge payload straight into the local active Chromium UI browser layouts.
|
|
162
|
-
* @param eventName - The targeted callback hook registered inside your CEF web apps.
|
|
163
|
-
* @param args - Variables passed into web execution loops.
|
|
164
|
-
*/
|
|
165
|
-
emitCef(eventName: string, ...args: any[]): void;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Subscribes a listener function to network event streams dispatched directly from the server.
|
|
169
|
-
* @param eventName - Targeted network channel string key.
|
|
170
|
-
* @param callback - Execution callback running upon packet resolution.
|
|
171
|
-
*/
|
|
172
|
-
onServer(eventName: string, callback: (...args: any[]) => void): void;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Registers a strict event listener tracking core CEF lifecycle mutations.
|
|
176
|
-
* @template E - Strictly bounded keys originating inside `MpCefEventsMap`.
|
|
177
|
-
* @param eventName - The specific target CEF lifecycle event type.
|
|
178
|
-
* @param callback - Type-safe handler function mapping parameters cleanly.
|
|
179
|
-
*/
|
|
180
|
-
onCef<E extends keyof MpCefEventsMap>(
|
|
181
|
-
eventName: E,
|
|
182
|
-
callback: MpCefEventsMap[E],
|
|
183
|
-
): void;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Registers a custom user-defined UI bridge event listener tracking incoming notifications dispatched from your web application scripts.
|
|
187
|
-
* @param eventName - Target string channel key matching web executions.
|
|
188
|
-
* @param callback - Arbitrary execution callback running on invocation.
|
|
189
|
-
*/
|
|
190
|
-
onCef(eventName: string, callback: (...args: any[]) => void): void;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Subscribes a type-safe listener function to catch core multiplayer platform tracking engine hooks.
|
|
194
|
-
* @template E - Strictly bounded keys originating inside `MpEventsMap`.
|
|
195
|
-
* @param eventName - The active client engine event name key.
|
|
196
|
-
* @param callback - Handler function whose structural signatures match engine data constraints exactly.
|
|
197
|
-
*/
|
|
198
|
-
on<E extends keyof MpEventsMap>(eventName: E, callback: MpEventsMap[E]): void;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Subscribes a custom script execution callback tracking local text channels or decoupled system events.
|
|
202
|
-
* @param eventName - The designated custom application event namespace key.
|
|
203
|
-
* @param callback - Handler logic executed immediately upon local triggers.
|
|
204
|
-
*/
|
|
205
|
-
on(eventName: string, callback: (...args: any[]) => void): void;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Detaches and de-allocates an active type-safe engine hook handler reference.
|
|
209
|
-
* @template E - Bounded validation keys linking to engine maps.
|
|
210
|
-
* @param eventName - Target client engine tracking channel name key.
|
|
211
|
-
* @param callback - The original functional reference signature block to tear down.
|
|
212
|
-
*/
|
|
213
|
-
off<E extends keyof MpEventsMap>(
|
|
214
|
-
eventName: E,
|
|
215
|
-
callback: MpEventsMap[E],
|
|
216
|
-
): void;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Detaches a general or custom application event string tracking handler layout logic block.
|
|
220
|
-
* @param eventName - The target event namespace string key.
|
|
221
|
-
* @param callback - Functional reference signature block to unbind.
|
|
222
|
-
*/
|
|
223
|
-
off(eventName: string, callback: (...args: any[]) => void): void;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Registers an execution text console command processor linked directly to player chatting or console prompt interactions.
|
|
227
|
-
* @param commandName - The terminal string command literal (e.g., passing `"spawn"` handles requests targeting `/spawn`).
|
|
228
|
-
* @param callback - Callback execution script processing console interactions.
|
|
229
|
-
*/
|
|
230
|
-
addCommand(
|
|
231
|
-
commandName: string,
|
|
232
|
-
callback: (id: number, args: string[]) => void,
|
|
233
|
-
): void;
|
|
234
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Map of core multiplayer engine events triggered by the client runtime environment.
|
|
3
|
+
* Covers resource lifecycles, network streaming updates, and entity synchronization.
|
|
4
|
+
* @category Events
|
|
5
|
+
*/
|
|
6
|
+
interface MpEventsMap {
|
|
7
|
+
/**
|
|
8
|
+
* Fired when any local resource begins initialization and starts running.
|
|
9
|
+
* @param resourceName - The unique identification name of the started resource.
|
|
10
|
+
*/
|
|
11
|
+
anyResourceStart(resourceName: string): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Fired when any local resource is explicitly terminated or reloaded.
|
|
15
|
+
* @param resourceName - The unique identification name of the stopped resource.
|
|
16
|
+
*/
|
|
17
|
+
anyResourceStop(resourceName: string): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Fired when the server signals that a server-side resource has started.
|
|
21
|
+
* @param resourceName - The unique identification name of the server resource.
|
|
22
|
+
*/
|
|
23
|
+
anyServerResourceStart(resourceName: string): void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Fired when the server signals that a server-side resource has stopped running.
|
|
27
|
+
* @param resourceName - The unique identification name of the server resource.
|
|
28
|
+
*/
|
|
29
|
+
anyServerResourceStop(resourceName: string): void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Fired specifically when *this* individual script resource completes loading.
|
|
33
|
+
*/
|
|
34
|
+
resourceStart(): void;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Fired specifically when *this* individual script resource is being shut down.
|
|
38
|
+
*/
|
|
39
|
+
resourceStop(): void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Fired when the engine re-scans and refreshes the global resource manifest map.
|
|
43
|
+
*/
|
|
44
|
+
resourcesRefresh(): void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Fired when a synchronized game object leaves the local player's streaming radius.
|
|
48
|
+
* @param netID - The network-assigned entity identification hash.
|
|
49
|
+
* @param gameID - The native engine entity handling index ID.
|
|
50
|
+
*/
|
|
51
|
+
objectStreamOut(netID: number, gameID: number): void;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Fired when a synchronized game object enters the local player's streaming radius.
|
|
55
|
+
* @param netID - The network-assigned entity identification hash.
|
|
56
|
+
* @param gameID - The native engine entity handling index ID.
|
|
57
|
+
*/
|
|
58
|
+
objectStreamIn(netID: number, gameID: number): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Fired when a synchronized pedestrian or NPC leaves the local player's streaming radius.
|
|
62
|
+
* @param netID - The network-assigned entity identification hash.
|
|
63
|
+
* @param gameID - The native engine entity handling index ID.
|
|
64
|
+
*/
|
|
65
|
+
pedStreamOut(netID: number, gameID: number): void;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Fired when a synchronized pedestrian or NPC enters the local player's streaming radius.
|
|
69
|
+
* @param netID - The network-assigned entity identification hash.
|
|
70
|
+
* @param gameID - The native engine entity handling index ID.
|
|
71
|
+
*/
|
|
72
|
+
pedStreamIn(netID: number, gameID: number): void;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Fired when a remote network player leaves the local user's streaming zone.
|
|
76
|
+
* @param netID - The network-assigned player synchronization ID.
|
|
77
|
+
* @param gameID - The native engine entity handling index ID.
|
|
78
|
+
*/
|
|
79
|
+
remotePlayerStreamOut(netID: number, gameID: number): void;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Fired when a remote network player enters the local user's streaming zone.
|
|
83
|
+
* @param netID - The network-assigned player synchronization ID.
|
|
84
|
+
* @param gameID - The native engine entity handling index ID.
|
|
85
|
+
*/
|
|
86
|
+
remotePlayerStreamIn(netID: number, gameID: number): void;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Fired when a synchronized vehicle leaves the local player's streaming radius.
|
|
90
|
+
* @param netID - The network-assigned entity identification hash.
|
|
91
|
+
* @param gameID - The native engine entity handling index ID.
|
|
92
|
+
*/
|
|
93
|
+
vehicleStreamOut(netID: number, gameID: number): void;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Fired when a synchronized vehicle enters the local player's streaming radius.
|
|
97
|
+
* @param netID - The network-assigned entity identification hash.
|
|
98
|
+
* @param gameID - The native engine entity handling index ID.
|
|
99
|
+
*/
|
|
100
|
+
vehicleStreamIn(netID: number, gameID: number): void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Payload structure capturing diagnostic crash or layout execution data when a CEF frame fails to load.
|
|
105
|
+
* @category Events
|
|
106
|
+
*/
|
|
107
|
+
type CefLoadingFailedError = {
|
|
108
|
+
/** The name identifier of the target frame window container. */
|
|
109
|
+
frameName: string;
|
|
110
|
+
/** Detailed failure description or engine reason statement. */
|
|
111
|
+
message: string;
|
|
112
|
+
/** File path URL source location string. */
|
|
113
|
+
source: string;
|
|
114
|
+
/** Line number coordinate mapping source code where compilation or loading dropped. */
|
|
115
|
+
line: string;
|
|
116
|
+
/** Column horizontal offset coordinate location. */
|
|
117
|
+
column: string;
|
|
118
|
+
/** Raw interpreter trace log array stack layout details. */
|
|
119
|
+
stack: string;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Map containing standard event listeners bound to web context layers (Chromium Embedded Framework).
|
|
124
|
+
* @category Events
|
|
125
|
+
*/
|
|
126
|
+
interface MpCefEventsMap {
|
|
127
|
+
/**
|
|
128
|
+
* Fired when a target browser instance finishes parsing the document structure tree.
|
|
129
|
+
* @param name - Unique registration name tracking the browser frame entity.
|
|
130
|
+
*/
|
|
131
|
+
domReady(name: string): void;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Fired if the underlying browser layer drops connectivity or triggers initialization errors.
|
|
135
|
+
* @param error - The comprehensive failure metadata payload context object.
|
|
136
|
+
*/
|
|
137
|
+
loadingFailed(error: CefLoadingFailedError): void;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Primary multi-target Event Emitter interface for managing client, server, and CEF bridge communications.
|
|
142
|
+
* Handles binding event listeners, deregistering handlers, and dispatching payloads across contexts.
|
|
143
|
+
* @category Events
|
|
144
|
+
*/
|
|
145
|
+
export interface MpEvents {
|
|
146
|
+
/**
|
|
147
|
+
* Dispatches a local event across the client resource scope.
|
|
148
|
+
* @param eventName - The target event channel identifier.
|
|
149
|
+
* @param args - Arbitrary payload arguments passed to active handlers.
|
|
150
|
+
*/
|
|
151
|
+
emit(eventName: string, ...args: any[]): void;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Encapsulates and forwards an event payload across the network socket layer directly to the server host.
|
|
155
|
+
* @param eventName - Target string channel matching server-side listeners.
|
|
156
|
+
* @param args - Data variables to serialize and stream over the network.
|
|
157
|
+
*/
|
|
158
|
+
emitServer(eventName: string, ...args: any[]): void;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Forwards a tracking event bridge payload straight into the local active Chromium UI browser layouts.
|
|
162
|
+
* @param eventName - The targeted callback hook registered inside your CEF web apps.
|
|
163
|
+
* @param args - Variables passed into web execution loops.
|
|
164
|
+
*/
|
|
165
|
+
emitCef(eventName: string, ...args: any[]): void;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Subscribes a listener function to network event streams dispatched directly from the server.
|
|
169
|
+
* @param eventName - Targeted network channel string key.
|
|
170
|
+
* @param callback - Execution callback running upon packet resolution.
|
|
171
|
+
*/
|
|
172
|
+
onServer(eventName: string, callback: (...args: any[]) => void): void;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Registers a strict event listener tracking core CEF lifecycle mutations.
|
|
176
|
+
* @template E - Strictly bounded keys originating inside `MpCefEventsMap`.
|
|
177
|
+
* @param eventName - The specific target CEF lifecycle event type.
|
|
178
|
+
* @param callback - Type-safe handler function mapping parameters cleanly.
|
|
179
|
+
*/
|
|
180
|
+
onCef<E extends keyof MpCefEventsMap>(
|
|
181
|
+
eventName: E,
|
|
182
|
+
callback: MpCefEventsMap[E],
|
|
183
|
+
): void;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Registers a custom user-defined UI bridge event listener tracking incoming notifications dispatched from your web application scripts.
|
|
187
|
+
* @param eventName - Target string channel key matching web executions.
|
|
188
|
+
* @param callback - Arbitrary execution callback running on invocation.
|
|
189
|
+
*/
|
|
190
|
+
onCef(eventName: string, callback: (...args: any[]) => void): void;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Subscribes a type-safe listener function to catch core multiplayer platform tracking engine hooks.
|
|
194
|
+
* @template E - Strictly bounded keys originating inside `MpEventsMap`.
|
|
195
|
+
* @param eventName - The active client engine event name key.
|
|
196
|
+
* @param callback - Handler function whose structural signatures match engine data constraints exactly.
|
|
197
|
+
*/
|
|
198
|
+
on<E extends keyof MpEventsMap>(eventName: E, callback: MpEventsMap[E]): void;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Subscribes a custom script execution callback tracking local text channels or decoupled system events.
|
|
202
|
+
* @param eventName - The designated custom application event namespace key.
|
|
203
|
+
* @param callback - Handler logic executed immediately upon local triggers.
|
|
204
|
+
*/
|
|
205
|
+
on(eventName: string, callback: (...args: any[]) => void): void;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Detaches and de-allocates an active type-safe engine hook handler reference.
|
|
209
|
+
* @template E - Bounded validation keys linking to engine maps.
|
|
210
|
+
* @param eventName - Target client engine tracking channel name key.
|
|
211
|
+
* @param callback - The original functional reference signature block to tear down.
|
|
212
|
+
*/
|
|
213
|
+
off<E extends keyof MpEventsMap>(
|
|
214
|
+
eventName: E,
|
|
215
|
+
callback: MpEventsMap[E],
|
|
216
|
+
): void;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Detaches a general or custom application event string tracking handler layout logic block.
|
|
220
|
+
* @param eventName - The target event namespace string key.
|
|
221
|
+
* @param callback - Functional reference signature block to unbind.
|
|
222
|
+
*/
|
|
223
|
+
off(eventName: string, callback: (...args: any[]) => void): void;
|
|
224
|
+
}
|