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
This commit is contained in:
Martin Probst 2019-10-21 14:44:13 +02:00 committed by atscott
parent fc8eecad3f
commit 09536423e8
1 changed files with 2 additions and 1 deletions

View File

@ -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 && (<any>value.constructor).name;