Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 7f178b1

Browse files
JiaLiPassionmhevery
authored andcommitted
feat(core): fix #996, expose UncaughtPromiseError (#1040)
1 parent 438210c commit 7f178b1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: lib/common/promise.ts

-7
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ Zone.__load_patch('ZoneAwarePromise', (global: any, Zone: ZoneType, api: _ZonePr
2222
return obj ? obj.toString() : Object.prototype.toString.call(obj);
2323
}
2424

25-
interface UncaughtPromiseError extends Error {
26-
zone: AmbientZone;
27-
task: Task;
28-
promise: ZoneAwarePromise<any>;
29-
rejection: any;
30-
}
31-
3225
const __symbol__ = api.symbol;
3326
const _uncaughtPromiseErrors: UncaughtPromiseError[] = [];
3427
const symbolPromise = __symbol__('Promise');

Diff for: lib/zone.ts

+7
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ interface _ZoneFrame {
336336
zone: Zone;
337337
}
338338

339+
interface UncaughtPromiseError extends Error {
340+
zone: Zone;
341+
task: Task;
342+
promise: Promise<any>;
343+
rejection: any;
344+
}
345+
339346
/**
340347
* Provides a way to configure the interception of zone events.
341348
*

0 commit comments

Comments
 (0)