fix(core): update

This commit is contained in:
Philipp Kunz 2023-04-17 21:01:18 +02:00
parent f3eac4a5f7
commit b0772e2372
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartpromise',
version: '4.0.1',
version: '4.0.2',
description: 'simple promises and Deferred constructs'
}

View File

@ -14,6 +14,12 @@ export class Deferred<T> {
public reject: IReject;
public status: TDeferredStatus;
public claimed = false;
public claim() {
if (this.claimed) {
throw new Error('Deferred already claimed');
}
this.claimed = true;
}
public startedAt: number;
public stoppedAt: number;