Skip to content

Commit 3322474

Browse files
committed
Added test for unused typeparameters in a typealias declaration
1 parent 09be537 commit 3322474

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
tests/cases/compiler/unusedTypeParameters10.ts(1,12): error TS6133: 'T' is declared but never used.
2+
3+
4+
==== tests/cases/compiler/unusedTypeParameters10.ts (1 errors) ====
5+
type Alias<T> = { };
6+
~
7+
!!! error TS6133: 'T' is declared but never used.
8+
type Alias2<T> = { x: T };
9+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [unusedTypeParameters10.ts]
2+
type Alias<T> = { };
3+
type Alias2<T> = { x: T };
4+
5+
6+
//// [unusedTypeParameters10.js]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//@noUnusedLocals:true
2+
//@noUnusedParameters:true
3+
4+
type Alias<T> = { };
5+
type Alias2<T> = { x: T };

0 commit comments

Comments
 (0)