Skip to content

Commit 73df554

Browse files
committed
Use "as" to prevent TS from auto-narrowing
1 parent c54739a commit 73df554

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tests/json-stringify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ doNotExecute(() => {
2323
});
2424

2525
doNotExecute(() => {
26-
const value: null | string | number | boolean | object | Array<any> = null;
26+
const value = null as null | string | number | boolean | object | any[];
2727
const result = JSON.stringify(value);
2828
type tests = [Expect<Equal<typeof result, string>>];
2929
});

0 commit comments

Comments
 (0)