Compare commits

...

2 Commits

Author SHA1 Message Date
37284da2cc 4.0.2 2023-04-17 21:01:18 +02:00
b0772e2372 fix(core): update 2023-04-17 21:01:18 +02:00
3 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"name": "@pushrocks/smartpromise",
"private": false,
"version": "4.0.1",
"version": "4.0.2",
"description": "simple promises and Deferred constructs",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",

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;