Skip to content

Commit 7ecfd2d

Browse files
josephperrottalxhub
authored andcommitted
fix(platform-browser): update type castings for JSON.parse usage (angular#40710)
Update usages of JSON.parse to be cast as specific types. PR Close angular#40710
1 parent 350dada commit 7ecfd2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/platform-browser/test/browser/transfer_state_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('escape/unescape', () => {
127127
'{&q;testString&q;:&q;&l;/script&g;&l;script&g;' +
128128
'alert(&s;Hello&a;&s; + \\&q;World\\&q;);&q;}');
129129

130-
const unescapedObj = JSON.parse(unescapeHtml(escaped));
130+
const unescapedObj = JSON.parse(unescapeHtml(escaped)) as {testString: string};
131131
expect(unescapedObj['testString']).toBe(testString);
132132
});
133133
});

0 commit comments

Comments
 (0)