@wireapp/commons
Version:
Collection of common components that are used across Wire web applications.
8 lines • 514 B
TypeScript
import { EventEmitter } from 'events';
export declare class TypedEventEmitter<T extends Record<string | symbol, any>> extends EventEmitter {
emit<K extends keyof T>(eventName: K, ...args: T[K][]): boolean;
on<K extends keyof T>(eventName: K, listener: (...args: T[K][]) => void): this;
once<K extends keyof T>(eventName: K, listener: (...args: T[K][]) => void): this;
off<K extends keyof T>(eventName: K, listener: (...args: T[K][]) => void): this;
}
//# sourceMappingURL=TypedEventEmitter.d.ts.map