@dxos/async
Advanced tools
Comparing version 2.12.22 to 2.12.23
@@ -5,3 +5,3 @@ export function onEvent(eventEmitter: any, eventName: string, callback: Function): () => any; | ||
}; | ||
export function waitForEvent(eventEmitter: any, eventName: string, test?: Function | undefined, timeout?: number | undefined): Promise<unknown>; | ||
export function waitForEvent(eventEmitter: any, eventName: string, test?: Function | undefined, timeout?: number | undefined, error?: unknown): Promise<unknown>; | ||
//# sourceMappingURL=events.d.ts.map |
@@ -35,5 +35,6 @@ "use strict"; | ||
* @param {Number} [timeout] | ||
* @param {unknown} [error] | ||
* @returns {Promise<unknown>} | ||
*/ | ||
const waitForEvent = (eventEmitter, eventName, test, timeout) => { | ||
const waitForEvent = (eventEmitter, eventName, test, timeout, error) => { | ||
let off; | ||
@@ -47,5 +48,5 @@ const promise = new Promise((resolve) => { | ||
}); | ||
return timeout ? async_1.promiseTimeout(promise, timeout).finally(off) : promise.finally(off); | ||
return timeout ? async_1.promiseTimeout(promise, timeout, error).finally(off) : promise.finally(off); | ||
}; | ||
exports.waitForEvent = waitForEvent; | ||
//# sourceMappingURL=events.js.map |
{ | ||
"name": "@dxos/async", | ||
"version": "2.12.22", | ||
"version": "2.12.23", | ||
"description": "Async utils.", | ||
@@ -27,3 +27,3 @@ "bugs": { | ||
"dependencies": { | ||
"@dxos/debug": "2.12.22" | ||
"@dxos/debug": "2.12.23" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
@@ -36,5 +36,6 @@ // | ||
* @param {Number} [timeout] | ||
* @param {unknown} [error] | ||
* @returns {Promise<unknown>} | ||
*/ | ||
export const waitForEvent = (eventEmitter, eventName, test, timeout) => { | ||
export const waitForEvent = (eventEmitter, eventName, test, timeout, error) => { | ||
let off; | ||
@@ -50,3 +51,3 @@ | ||
return timeout ? promiseTimeout(promise, timeout).finally(off) : promise.finally(off); | ||
return timeout ? promiseTimeout(promise, timeout, error).finally(off) : promise.finally(off); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118202
2107
+ Added@dxos/debug@2.12.23(transitive)
- Removed@dxos/debug@2.12.22(transitive)
Updated@dxos/debug@2.12.23