Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
1f1e0e4ee1 | |||
139d4cb56d | |||
8038e54f53 | |||
37284da2cc | |||
b0772e2372 |
@ -7,10 +7,10 @@
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartpromise",
|
||||
"description": "simple promises and Deferred constructs",
|
||||
"npmPackagename": "@pushrocks/smartpromise",
|
||||
"npmPackagename": "@push.rocks/smartpromise",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
12
package.json
12
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartpromise",
|
||||
"name": "@push.rocks/smartpromise",
|
||||
"private": false,
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.3",
|
||||
"description": "simple promises and Deferred constructs",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
@ -21,11 +21,11 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/smartq#README",
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.65",
|
||||
"@gitzone/tsrun": "^1.2.39",
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
"@gitzone/tsrun": "^1.2.42",
|
||||
"@gitzone/tstest": "^1.0.74",
|
||||
"@pushrocks/tapbundle": "^5.0.4",
|
||||
"@types/node": "^18.15.11"
|
||||
"@pushrocks/tapbundle": "^5.0.8",
|
||||
"@types/node": "^20.4.1"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
585
pnpm-lock.yaml
generated
585
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartpromise',
|
||||
version: '4.0.1',
|
||||
name: '@push.rocks/smartpromise',
|
||||
version: '4.0.3',
|
||||
description: 'simple promises and Deferred constructs'
|
||||
}
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user