• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / brighterscript / #10414

pending completion
#10414

push

web-flow
Bump semver from 5.7.1 to 5.7.2 (#837)

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

5536 of 6744 branches covered (82.09%)

Branch coverage included in aggregate %.

8410 of 9083 relevant lines covered (92.59%)

1635.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.0
/src/deferred.ts
1
export class Deferred<T = void> {
1✔
2
    constructor() {
3
        this._promise = new Promise<T>((resolve, reject) => {
116✔
4
            this._resolve = resolve;
116✔
5
            this._reject = reject;
116✔
6
        });
7
    }
8
    public get promise() {
9
        return this._promise;
116✔
10
    }
11
    private _promise: Promise<T>;
12

13
    /**
14
     * Indicates whether the promise has been resolved or rejected
15
     */
16
    public get isCompleted() {
17
        return this._isCompleted;
×
18
    }
19
    private _isCompleted = false;
116✔
20

21
    /**
22
     * Indicates whether the promise has been resolved
23
     */
24
    public get isResolved() {
25
        return this._isResolved;
×
26
    }
27
    private _isResolved = false;
116✔
28

29
    /**
30
     * Indicates whether the promise has been rejected
31
     */
32
    public get isRejected() {
33
        return this._isRejected;
×
34
    }
35
    private _isRejected = false;
116✔
36

37
    /**
38
     * Resolve the promise
39
     */
40
    public resolve(value: T) {
41
        if (this._isCompleted) {
116!
42
            throw new Error('Already completed.');
×
43
        }
44
        this._isCompleted = true;
116✔
45
        this._isResolved = true;
116✔
46
        this._resolve(value);
116✔
47
    }
48
    private _resolve: (value: T) => void;
49

50
    /**
51
     * Reject the promise
52
     */
53
    public reject(value: T) {
54
        if (this._isCompleted) {
×
55
            throw new Error('Already completed.');
×
56
        }
57
        this._isCompleted = true;
×
58
        this._isRejected = true;
×
59
        this._reject(value);
×
60
    }
61
    private _reject: (value: T) => void;
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc