IEvent Interface
Base interface for event emitters.
Signature
export interface IEvent
Call Signatures
CallSignature | Description |
---|---|
(event: string, listener: (...args: any[]) => void): any | Base event emitter signature. |
Call Signature Details
(event: string, listener: (...args: any[]) => void): any
Base event emitter signature.
Signature
(event: string, listener: (...args: any[]) => void): any;
Remarks
The event emitter polyfill and the node event emitter have different event types: string | symbol
vs. string | number
.
So for our typing we'll contrain to string, that way we work with both.