@wayward/types 2.14.4-beta.dev.20250330.1 → 2.14.4-beta.dev.20250405.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.
@@ -49,7 +49,7 @@ type Handler<H, F> = (host: H, ...args: ArgsOf<F>) => ReturnOf<F>;
49
49
  type WeakHandler<H, F> = WeakRef<Handler<H, F>>;
50
50
  type UndefinedFromVoid<V> = V extends void ? undefined : V;
51
51
  export interface IEventEmitter<H = any, E = any> {
52
- readonly closed?: true;
52
+ readonly closed?: boolean;
53
53
  emit<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
54
54
  /**
55
55
  * Emit an event only to the subscribers of this emitter instance.
@@ -80,6 +80,10 @@ export interface IEventEmitter<H = any, E = any> {
80
80
  until<E2>(emitter: IEventEmitterHost<E2>, ...events: Array<keyof E2>): IUntilSubscriber<H, E>;
81
81
  until(promise: Promise<any>): IUntilSubscriber<H, E>;
82
82
  hasHandlersForEvent(...events: Array<keyof E>): boolean;
83
+ /**
84
+ * Re-opens a closed event emitter
85
+ */
86
+ open(): void;
83
87
  /**
84
88
  * Closes an event emitter, which will prevent any further subscriptions from being made.
85
89
  */
@@ -111,8 +115,12 @@ declare class EventEmitter<H, E> {
111
115
  * This means no more events will be emitted and no more subscriptions can be made.
112
116
  * Public so that the interface can expose a readonly version of this.
113
117
  */
114
- closed?: true;
118
+ closed?: boolean;
115
119
  constructor(host: H);
120
+ /**
121
+ * Re-opens a closed event emitter
122
+ */
123
+ open(): void;
116
124
  /**
117
125
  * Closes an event emitter, which will prevent any further subscriptions from being made.
118
126
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.14.4-beta.dev.20250330.1",
4
+ "version": "2.14.4-beta.dev.20250405.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",