import { EventEmitter } from 'events' ; class AsyncEventEmitter extends EventEmitter { async asyncEmit ( type , data ? ) { const listeners = this . listeners ( type ) ; for ( const listener of listeners ) { await listener ( data ) ; } } } export { AsyncEventEmitter } ;