mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
add test that we detect the used type variable in an infer type
This commit is contained in:
committed by
GitHub
parent
d199173923
commit
62fd3fd90f
@@ -5,6 +5,7 @@
|
||||
| eval.js:19:9:19:24 | not_used_by_eval | Unused variable not_used_by_eval. |
|
||||
| externs.js:6:5:6:13 | iAmUnused | Unused variable iAmUnused. |
|
||||
| importWithoutPragma.jsx:1:1:1:27 | import ... react'; | Unused import h. |
|
||||
| interTypes.ts:1:1:1:37 | import ... where"; | Unused import Bar. |
|
||||
| multi-imports.js:1:1:1:29 | import ... om 'x'; | Unused imports a, b, d. |
|
||||
| multi-imports.js:2:1:2:42 | import ... om 'x'; | Unused imports alphabetically, ordered. |
|
||||
| namespaceImportAsType.ts:3:1:3:23 | import ... om "z"; | Unused import Z. |
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Foo, Bar } from "somewhere"; // OK
|
||||
|
||||
type FooBar<T> =
|
||||
T extends [infer S extends Foo, ...unknown[]]
|
||||
? S
|
||||
: never;
|
||||
Reference in New Issue
Block a user