Files
welshman/packages/lib/src/Emitter.ts
T
2024-06-12 09:34:45 -07:00

11 lines
239 B
TypeScript

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