add test that we detect the used type variable in an infer type

This commit is contained in:
Erik Krogh Kristensen
2022-05-27 14:15:27 +00:00
committed by GitHub
parent d199173923
commit 62fd3fd90f
2 changed files with 7 additions and 0 deletions

View File

@@ -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. |

View File

@@ -0,0 +1,6 @@
import { Foo, Bar } from "somewhere"; // OK
type FooBar<T> =
T extends [infer S extends Foo, ...unknown[]]
? S
: never;