BREAKING CHANGE(scope): change change to @pushrocks scope
This commit is contained in:
16
ts/index.ts
16
ts/index.ts
@ -1,12 +1,10 @@
|
||||
import * as plugins from './smartevent.plugins'
|
||||
import { EventEmitter } from 'events'
|
||||
import * as plugins from './smartevent.plugins';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
export {
|
||||
EventEmitter
|
||||
}
|
||||
export { EventEmitter };
|
||||
|
||||
export let once = async <T>(eventEmitter: EventEmitter, eventName: string): Promise<T> => {
|
||||
let done = plugins.smartq.defer<T>()
|
||||
eventEmitter.once(eventName,done.resolve)
|
||||
return await done.promise
|
||||
}
|
||||
let done = plugins.smartpromise.defer<T>();
|
||||
eventEmitter.once(eventName, done.resolve);
|
||||
return await done.promise;
|
||||
};
|
||||
|
@ -1,8 +1,4 @@
|
||||
import 'typings-global'
|
||||
import * as smartq from 'smartq'
|
||||
import events = require('events')
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import events = require('events');
|
||||
|
||||
export {
|
||||
events,
|
||||
smartq
|
||||
}
|
||||
export { events, smartpromise };
|
||||
|
Reference in New Issue
Block a user