pw-js-api 0.2.8 → 0.2.9-dev.aaae58f

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 a listener for the event type, it can even be a promise too.
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
- * Adds a listener for the event type, it can even be a promise too.
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 a listener for the event type, it can even be a promise too.
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
- * Adds a listener for the event type, it can even be a promise too.
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pw-js-api",
3
- "version": "0.2.8",
3
+ "version": "0.2.9-dev.aaae58f",
4
4
  "description": "A PixelWalker Library, aims to be minimal with support for browsers.",
5
5
  "exports": {
6
6
  "types": "./esm/index.js",