Skip to content

Commit 62fd3fd

Browse files
authored
add test that we detect the used type variable in an infer type
1 parent d199173 commit 62fd3fd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

javascript/ql/test/query-tests/Declarations/UnusedVariable/UnusedVariable.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
| eval.js:19:9:19:24 | not_used_by_eval | Unused variable not_used_by_eval. |
66
| externs.js:6:5:6:13 | iAmUnused | Unused variable iAmUnused. |
77
| importWithoutPragma.jsx:1:1:1:27 | import ... react'; | Unused import h. |
8+
| interTypes.ts:1:1:1:37 | import ... where"; | Unused import Bar. |
89
| multi-imports.js:1:1:1:29 | import ... om 'x'; | Unused imports a, b, d. |
910
| multi-imports.js:2:1:2:42 | import ... om 'x'; | Unused imports alphabetically, ordered. |
1011
| namespaceImportAsType.ts:3:1:3:23 | import ... om "z"; | Unused import Z. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { Foo, Bar } from "somewhere"; // OK
2+
3+
type FooBar<T> =
4+
T extends [infer S extends Foo, ...unknown[]]
5+
? S
6+
: never;

0 commit comments

Comments
 (0)