fastevent 2.2.8 → 2.2.9

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.
@@ -369,10 +369,10 @@ declare class FastEventScope<Events extends Record<string, any> = Record<string,
369
369
  emit<R = any, T extends string = string>(message: FastEventEmitMessage<{
370
370
  [K in T]: K extends Types ? Events[K] : any;
371
371
  }, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): R[];
372
- emitAsync<R = any>(type: Types, payload?: Events[Types], retain?: boolean): Promise<[R | Error][]>;
373
- emitAsync<R = any>(type: string, payload?: any, retain?: boolean): Promise<[R | Error][]>;
374
- emitAsync<R = any>(type: string, payload?: any, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
375
- emitAsync<R = any>(type: Types, payload?: Events[Types], options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
372
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: Events[T], retain?: boolean): Promise<[R | Error][]>;
373
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[T] : any, retain?: boolean): Promise<[R | Error][]>;
374
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: Events[T], options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
375
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[T] : any, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
376
376
  emitAsync<R = any>(message: TypedFastEventMessage<Events, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
377
377
  waitFor<T extends Types>(type: T, timeout?: number): Promise<TypedFastEventMessage<{
378
378
  [key in T]: Events[T];
@@ -800,14 +800,14 @@ declare class FastEvent<Events extends Record<string, any> = Record<string, any>
800
800
  * });
801
801
  * ```
802
802
  */
803
- emitAsync<R = any>(type: string, payload?: any, retain?: boolean): Promise<[R | Error][]>;
804
- emitAsync<R = any>(type: Types, payload?: AllEvents[Types], retain?: boolean): Promise<[R | Error][]>;
803
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: AllEvents[T], retain?: boolean): Promise<[R | Error][]>;
804
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? AllEvents[T] : any, retain?: boolean): Promise<[R | Error][]>;
805
805
  emitAsync<R = any, T extends string = string>(message: FastEventEmitMessage<{
806
806
  [K in T]: K extends Types ? AllEvents[K] : any;
807
807
  }, Meta>, retain?: boolean): Promise<[R | Error][]>;
808
808
  emitAsync<R = any>(message: FastEventEmitMessage<AllEvents, Meta>, retain?: boolean): Promise<[R | Error][]>;
809
- emitAsync<R = any>(type: string, payload?: any, options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
810
- emitAsync<R = any>(type: Types, payload?: AllEvents[Types], options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
809
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? AllEvents[T] : any, options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
810
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: AllEvents[T], options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
811
811
  emitAsync<R = any, T extends string = string>(message: FastEventEmitMessage<{
812
812
  [K in T]: K extends Types ? AllEvents[K] : any;
813
813
  }, Meta>, options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
@@ -369,10 +369,10 @@ declare class FastEventScope<Events extends Record<string, any> = Record<string,
369
369
  emit<R = any, T extends string = string>(message: FastEventEmitMessage<{
370
370
  [K in T]: K extends Types ? Events[K] : any;
371
371
  }, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): R[];
372
- emitAsync<R = any>(type: Types, payload?: Events[Types], retain?: boolean): Promise<[R | Error][]>;
373
- emitAsync<R = any>(type: string, payload?: any, retain?: boolean): Promise<[R | Error][]>;
374
- emitAsync<R = any>(type: string, payload?: any, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
375
- emitAsync<R = any>(type: Types, payload?: Events[Types], options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
372
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: Events[T], retain?: boolean): Promise<[R | Error][]>;
373
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[T] : any, retain?: boolean): Promise<[R | Error][]>;
374
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: Events[T], options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
375
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[T] : any, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
376
376
  emitAsync<R = any>(message: TypedFastEventMessage<Events, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
377
377
  waitFor<T extends Types>(type: T, timeout?: number): Promise<TypedFastEventMessage<{
378
378
  [key in T]: Events[T];
@@ -800,14 +800,14 @@ declare class FastEvent<Events extends Record<string, any> = Record<string, any>
800
800
  * });
801
801
  * ```
802
802
  */
803
- emitAsync<R = any>(type: string, payload?: any, retain?: boolean): Promise<[R | Error][]>;
804
- emitAsync<R = any>(type: Types, payload?: AllEvents[Types], retain?: boolean): Promise<[R | Error][]>;
803
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: AllEvents[T], retain?: boolean): Promise<[R | Error][]>;
804
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? AllEvents[T] : any, retain?: boolean): Promise<[R | Error][]>;
805
805
  emitAsync<R = any, T extends string = string>(message: FastEventEmitMessage<{
806
806
  [K in T]: K extends Types ? AllEvents[K] : any;
807
807
  }, Meta>, retain?: boolean): Promise<[R | Error][]>;
808
808
  emitAsync<R = any>(message: FastEventEmitMessage<AllEvents, Meta>, retain?: boolean): Promise<[R | Error][]>;
809
- emitAsync<R = any>(type: string, payload?: any, options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
810
- emitAsync<R = any>(type: Types, payload?: AllEvents[Types], options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
809
+ emitAsync<R = any, T extends string = string>(type: T, payload?: T extends Types ? AllEvents[T] : any, options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
810
+ emitAsync<R = any, T extends Types = Types>(type: T, payload?: AllEvents[T], options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;
811
811
  emitAsync<R = any, T extends string = string>(message: FastEventEmitMessage<{
812
812
  [K in T]: K extends Types ? AllEvents[K] : any;
813
813
  }, Meta>, options?: FastEventListenerArgs<Meta>): Promise<[R | Error][]>;