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

Commit

Permalink
feat(core): fix #996, expose UncaughtPromiseError (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion authored and mhevery committed Mar 14, 2018
1 parent 438210c commit 7f178b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/common/promise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ Zone.__load_patch('ZoneAwarePromise', (global: any, Zone: ZoneType, api: _ZonePr
return obj ? obj.toString() : Object.prototype.toString.call(obj);
}

interface UncaughtPromiseError extends Error {
zone: AmbientZone;
task: Task;
promise: ZoneAwarePromise<any>;
rejection: any;
}

const __symbol__ = api.symbol;
const _uncaughtPromiseErrors: UncaughtPromiseError[] = [];
const symbolPromise = __symbol__('Promise');
Expand Down
7 changes: 7 additions & 0 deletions lib/zone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ interface _ZoneFrame {
zone: Zone;
}

interface UncaughtPromiseError extends Error {
zone: Zone;
task: Task;
promise: Promise<any>;
rejection: any;
}

/**
* Provides a way to configure the interception of zone events.
*
Expand Down

0 comments on commit 7f178b1

Please sign in to comment.