Category
A type-checked EventEmitter.
EventEmitter
The event names and listener signatures
import { EventEmitter } from 'events';type Events = { success: () => void; error: (error: Error) => void;};class TypedClass extends (EventEmitter as new () => TypedEventEmitter<Events>) {} Copy
import { EventEmitter } from 'events';type Events = { success: () => void; error: (error: Error) => void;};class TypedClass extends (EventEmitter as new () => TypedEventEmitter<Events>) {}
Typed EventEmitter
A type-checked
EventEmitter
.