From 65431fccd80815b6ddd74983f58361b9685493ea Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Sun, 4 Mar 2018 16:39:11 +0900 Subject: [PATCH] feat(core): fix #996, expose UncaughtPromiseError --- lib/common/promise.ts | 7 ------- lib/zone.ts | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/common/promise.ts b/lib/common/promise.ts index bb34f5a20..90a68633c 100644 --- a/lib/common/promise.ts +++ b/lib/common/promise.ts @@ -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; - rejection: any; - } - const __symbol__ = api.symbol; const _uncaughtPromiseErrors: UncaughtPromiseError[] = []; const symbolPromise = __symbol__('Promise'); diff --git a/lib/zone.ts b/lib/zone.ts index 76efc031a..9cbd04fdc 100644 --- a/lib/zone.ts +++ b/lib/zone.ts @@ -336,6 +336,13 @@ interface _ZoneFrame { zone: Zone; } +interface UncaughtPromiseError extends Error { + zone: Zone; + task: Task; + promise: Promise; + rejection: any; +} + /** * Provides a way to configure the interception of zone events. *