import { EventEmitter } from 'events' ; export class EventEmitterWrapper implements EventEmitter { constructor ( private readonly _wrapped ) { } public addListener ( event , listener ) { this . _wrapped . addListener ( event , listener ) ; return this ; } public on ( event , listener ) { this . _wrapped . on ( event , listener ) ; return this ; } public once ( event , listener ) { this . _wrapped . once ( event , listener ) ; return this ; } public prependListener ( event , listener ) { this . _wrapped . prependListener ( event , listener ) ; return this ; } public prependOnceListener ( event , listener ) { this . _wrapped . prependOnceListener ( event , listener ) ; return this ; } public removeListener ( event , listener ) { this . _wrapped . removeListener ( event , listener ) ; return this ; } public off ( event , listener ) { this . _wrapped . off ( event , listener ) ; return this ; } public removeAllListeners ( event ? ) { this . _wrapped . removeAllListeners ( event ) ; return this ; } public setMaxListeners ( n ) { this . _wrapped . setMaxListeners ( n ) ; return this ; } public getMaxListeners ( ) { return this . _wrapped . getMaxListeners ( ) ; } public listeners ( event ) { return this . _wrapped . listeners ( event ) ; } public rawListeners ( event ) { return this . _wrapped . rawListeners ( event ) ; } public emit ( event , ... args ) { return this . _wrapped . emit ( event , ... args ) ; } public eventNames ( ) { return this . _wrapped . eventNames ( ) ; } public listenerCount ( type ) { return this . _wrapped . listenerCount ( type ) ; } }