本文整理匯總了TypeScript中ts-async-eventemitter.AsyncEventEmitter.emitAsync方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript AsyncEventEmitter.emitAsync方法的具體用法?TypeScript AsyncEventEmitter.emitAsync怎麽用?TypeScript AsyncEventEmitter.emitAsync使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ts-async-eventemitter.AsyncEventEmitter
的用法示例。
在下文中一共展示了AsyncEventEmitter.emitAsync方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: dispose
/**
* The method is used to dispose the collection.
* @returns promise that will resolve once the object can be deleted
*/
public async dispose(): Promise<void> {
await this._ee.emitAsync<void>("dispose");
delete this._db;
this._ee.removeAllListeners();
delete this._ee;
}
示例2:
o.item.promise.then(() => {
isItemResolved = true;
return this._ee.emitAsync<void>("insert", o.item);
});