From 09536423e83892e716de13b2d14f12fff757f5a0 Mon Sep 17 00:00:00 2001 From: Martin Probst Date: Mon, 21 Oct 2019 14:44:13 +0200 Subject: [PATCH] fix(zone.js): work around TS3.7 issue (#33294) In TypeScript 3.7, circularity detection misfires on the declaration of `value` here. https://github.com/microsoft/TypeScript/issues/32950 Declaring an explicit type avoids the problem. PR Close #33294 --- packages/zone.js/lib/zone-spec/wtf.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/zone.js/lib/zone-spec/wtf.ts b/packages/zone.js/lib/zone-spec/wtf.ts index 7da91d744d..c0ff9b160f 100644 --- a/packages/zone.js/lib/zone-spec/wtf.ts +++ b/packages/zone.js/lib/zone-spec/wtf.ts @@ -131,7 +131,8 @@ const out: {[k: string]: any} = {}; for (const key in obj) { if (obj.hasOwnProperty(key)) { - let value = obj[key]; + // explicit : any due to https://github.com/microsoft/TypeScript/issues/33191 + let value: any = obj[key]; switch (typeof value) { case 'object': const name = value && value.constructor && (value.constructor).name;