File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
javascript/ql/test/library-tests/TypeScript/Types Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 9090| tst.ts:43:26:43:48 | { foo: ... s const | { readonly foo: "foo"; } |
9191| tst.ts:43:28:43:30 | foo | "foo" |
9292| tst.ts:43:33:43:37 | "foo" | "foo" |
93+ | tst.ts:47:8:47:8 | e | unknown |
94+ | tst.ts:48:7:48:14 | typeof e | "string" \| "number" \| "bigint" \| "boolean" \| "s... |
95+ | tst.ts:48:7:48:27 | typeof ... string" | boolean |
96+ | tst.ts:48:14:48:14 | e | unknown |
97+ | tst.ts:48:20:48:27 | "string" | "string" |
98+ | tst.ts:49:11:49:11 | b | string |
99+ | tst.ts:49:24:49:24 | e | string |
93100| type_alias.ts:3:5:3:5 | b | boolean |
94101| type_alias.ts:7:5:7:5 | c | ValueOrArray<number> |
95102| type_alias.ts:14:9:14:32 | [proper ... ]: Json | any |
Original file line number Diff line number Diff line change 6868| tst.ts:39:60:39:65 | number | number |
6969| tst.ts:39:60:39:67 | number[] | number[] |
7070| tst.ts:40:18:40:24 | unknown | unknown |
71+ | tst.ts:49:15:49:20 | string | string |
7172| type_alias.ts:1:6:1:6 | B | boolean |
7273| type_alias.ts:1:10:1:16 | boolean | boolean |
7374| type_alias.ts:3:8:3:8 | B | boolean |
Original file line number Diff line number Diff line change 11| tst.ts:40:5:40:15 | unknownType | unknown |
2+ | tst.ts:47:8:47:8 | e | unknown |
3+ | tst.ts:48:14:48:14 | e | unknown |
Original file line number Diff line number Diff line change @@ -41,3 +41,11 @@ let unknownType: unknown;
4141
4242let constArrayLiteral = [ 1 , 2 ] as const ;
4343let constObjectLiteral = { foo : "foo" } as const ;
44+
45+
46+ try { }
47+ catch ( e : unknown ) {
48+ if ( typeof e === "string" ) {
49+ let b : string = e ;
50+ }
51+ }
You can’t perform that action at this time.
0 commit comments