mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Added test for unused typeparameters in a typealias declaration
This commit is contained in:
parent
09be537786
commit
33224747b3
@ -0,0 +1,9 @@
|
||||
tests/cases/compiler/unusedTypeParameters10.ts(1,12): error TS6133: 'T' is declared but never used.
|
||||
|
||||
|
||||
==== tests/cases/compiler/unusedTypeParameters10.ts (1 errors) ====
|
||||
type Alias<T> = { };
|
||||
~
|
||||
!!! error TS6133: 'T' is declared but never used.
|
||||
type Alias2<T> = { x: T };
|
||||
|
||||
6
tests/baselines/reference/unusedTypeParameters10.js
Normal file
6
tests/baselines/reference/unusedTypeParameters10.js
Normal file
@ -0,0 +1,6 @@
|
||||
//// [unusedTypeParameters10.ts]
|
||||
type Alias<T> = { };
|
||||
type Alias2<T> = { x: T };
|
||||
|
||||
|
||||
//// [unusedTypeParameters10.js]
|
||||
5
tests/cases/compiler/unusedTypeParameters10.ts
Normal file
5
tests/cases/compiler/unusedTypeParameters10.ts
Normal file
@ -0,0 +1,5 @@
|
||||
//@noUnusedLocals:true
|
||||
//@noUnusedParameters:true
|
||||
|
||||
type Alias<T> = { };
|
||||
type Alias2<T> = { x: T };
|
||||
Loading…
x
Reference in New Issue
Block a user