pw-js-api 0.2.8 → 0.2.9-dev.043b9e9
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.
|
@@ -67,14 +67,14 @@ export default class PWGameClient<StateT extends Partial<{
|
|
|
67
67
|
[K in keyof WorldEvents]: any;
|
|
68
68
|
}>, keyof WorldEvents>>(hook: Hook<HookState>): PWGameClient<StateT & HookState>;
|
|
69
69
|
/**
|
|
70
|
-
* Adds
|
|
70
|
+
* Adds listeners to the end of the chain for that event type, it can even be a promise too.
|
|
71
71
|
*
|
|
72
72
|
* If the callback returns a specific string "STOP", it will prevent further listeners from being invoked.
|
|
73
73
|
*/
|
|
74
74
|
addCallback<Event extends keyof CustomBotEvents>(type: Event, ...cbs: Array<(data: MergedEvents[Event]) => Promisable<void | "STOP">>): this;
|
|
75
75
|
addCallback<Event extends keyof WorldEvents>(type: Event, ...cbs: Array<(data: MergedEvents[Event], states?: SafeCheck<Event, StateT>) => Promisable<void | "STOP">>): this;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Inserts listeners at the start of the chain for that event type, it can even be a promise too.
|
|
78
78
|
*
|
|
79
79
|
* If the callback returns a specific string "STOP", it will prevent further listeners from being invoked.
|
|
80
80
|
*/
|
|
@@ -67,14 +67,14 @@ export default class PWGameClient<StateT extends Partial<{
|
|
|
67
67
|
[K in keyof WorldEvents]: any;
|
|
68
68
|
}>, keyof WorldEvents>>(hook: Hook<HookState>): PWGameClient<StateT & HookState>;
|
|
69
69
|
/**
|
|
70
|
-
* Adds
|
|
70
|
+
* Adds listeners to the end of the chain for that event type, it can even be a promise too.
|
|
71
71
|
*
|
|
72
72
|
* If the callback returns a specific string "STOP", it will prevent further listeners from being invoked.
|
|
73
73
|
*/
|
|
74
74
|
addCallback<Event extends keyof CustomBotEvents>(type: Event, ...cbs: Array<(data: MergedEvents[Event]) => Promisable<void | "STOP">>): this;
|
|
75
75
|
addCallback<Event extends keyof WorldEvents>(type: Event, ...cbs: Array<(data: MergedEvents[Event], states?: SafeCheck<Event, StateT>) => Promisable<void | "STOP">>): this;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Inserts listeners at the start of the chain for that event type, it can even be a promise too.
|
|
78
78
|
*
|
|
79
79
|
* If the callback returns a specific string "STOP", it will prevent further listeners from being invoked.
|
|
80
80
|
*/
|
package/esm/types/api.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export interface ListBlockResult {
|
|
|
146
146
|
*/
|
|
147
147
|
Layer: number;
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* EELVL ID.
|
|
150
150
|
*/
|
|
151
151
|
LegacyId: number;
|
|
152
152
|
/**
|
|
@@ -164,7 +164,9 @@ export interface ListBlockResult {
|
|
|
164
164
|
*/
|
|
165
165
|
PaletteId: string;
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
167
|
+
* EELVL block arguments.
|
|
168
|
+
*
|
|
169
|
+
* For example it can indicate block's rotation (for example for half blocks), indicate portal arguments, etc.
|
|
168
170
|
*/
|
|
169
171
|
LegacyMorph?: number[];
|
|
170
172
|
}
|