Files
welshman/packages/lib/src/Emitter.ts
T
2024-09-26 15:36:01 -07:00

11 lines
230 B
TypeScript

import {EventEmitter} from 'events'
export class Emitter extends EventEmitter {
emit(type: string, ...args: any[]) {
const a = super.emit(type, ...args)
const b = super.emit('*', type, ...args)
return a && b
}
}