Skip to content

Commit 8d4a80b

Browse files
mprobstatscott
authored andcommitted
fix(zone.js): work around TS3.7 issue (#33294)
In TypeScript 3.7, circularity detection misfires on the declaration of `value` here. microsoft/TypeScript#32950 Declaring an explicit type avoids the problem. PR Close #33294
1 parent 20647b4 commit 8d4a80b

File tree

1 file changed

+2
-1
lines changed
  • packages/zone.js/lib/zone-spec

1 file changed

+2
-1
lines changed

packages/zone.js/lib/zone-spec/wtf.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@
131131
const out: {[k: string]: any} = {};
132132
for (const key in obj) {
133133
if (obj.hasOwnProperty(key)) {
134-
let value = obj[key];
134+
// explicit : any due to https://github.com/microsoft/TypeScript/issues/33191
135+
let value: any = obj[key];
135136
switch (typeof value) {
136137
case 'object':
137138
const name = value && value.constructor && (<any>value.constructor).name;

0 commit comments

Comments
 (0)