fastevent 2.2.6 → 2.2.7

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.
@@ -358,12 +358,16 @@ declare class FastEventScope<Events extends Record<string, any> = Record<string,
358
358
  clear(): void;
359
359
  emit(type: Types, directive: symbol): void;
360
360
  emit(type: string, directive: symbol): void;
361
+ emit<R = any, T extends Types = Types>(type: T, payload?: Events[T], retain?: boolean): R[];
362
+ emit<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[Types] : any, retain?: boolean): R[];
361
363
  emit<R = any>(type: Types, payload?: Events[Types], options?: FastEventListenerArgs<FinalMeta>): R[];
362
364
  emit<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[Types] : any, options?: FastEventListenerArgs<FinalMeta>): R[];
363
365
  emit<R = any>(message: FastEventEmitMessage<Events, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): R[];
364
366
  emit<R = any, T extends string = string>(message: FastEventEmitMessage<{
365
367
  [K in T]: K extends Types ? Events[K] : any;
366
368
  }, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): R[];
369
+ emitAsync<R = any>(type: Types, payload?: Events[Types], retain?: boolean): Promise<[R | Error][]>;
370
+ emitAsync<R = any>(type: string, payload?: any, retain?: boolean): Promise<[R | Error][]>;
367
371
  emitAsync<R = any>(type: string, payload?: any, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
368
372
  emitAsync<R = any>(type: Types, payload?: Events[Types], options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
369
373
  emitAsync<R = any>(message: TypedFastEventMessage<Events, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
@@ -358,12 +358,16 @@ declare class FastEventScope<Events extends Record<string, any> = Record<string,
358
358
  clear(): void;
359
359
  emit(type: Types, directive: symbol): void;
360
360
  emit(type: string, directive: symbol): void;
361
+ emit<R = any, T extends Types = Types>(type: T, payload?: Events[T], retain?: boolean): R[];
362
+ emit<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[Types] : any, retain?: boolean): R[];
361
363
  emit<R = any>(type: Types, payload?: Events[Types], options?: FastEventListenerArgs<FinalMeta>): R[];
362
364
  emit<R = any, T extends string = string>(type: T, payload?: T extends Types ? Events[Types] : any, options?: FastEventListenerArgs<FinalMeta>): R[];
363
365
  emit<R = any>(message: FastEventEmitMessage<Events, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): R[];
364
366
  emit<R = any, T extends string = string>(message: FastEventEmitMessage<{
365
367
  [K in T]: K extends Types ? Events[K] : any;
366
368
  }, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): R[];
369
+ emitAsync<R = any>(type: Types, payload?: Events[Types], retain?: boolean): Promise<[R | Error][]>;
370
+ emitAsync<R = any>(type: string, payload?: any, retain?: boolean): Promise<[R | Error][]>;
367
371
  emitAsync<R = any>(type: string, payload?: any, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
368
372
  emitAsync<R = any>(type: Types, payload?: Events[Types], options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;
369
373
  emitAsync<R = any>(message: TypedFastEventMessage<Events, FinalMeta>, options?: FastEventListenerArgs<FinalMeta>): Promise<[R | Error][]>;