19 lines
670 B
Plaintext
19 lines
670 B
Plaintext
|
==== tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts (4 errors) ====
|
||
|
// type parameters cannot be used as base types
|
||
|
// these are all errors
|
||
|
|
||
|
class C<T> extends T { }
|
||
|
~
|
||
|
!!! A class may only extend another class.
|
||
|
class C2<T, U> extends U { }
|
||
|
~
|
||
|
!!! A class may only extend another class.
|
||
|
|
||
|
interface I<T> extends T { }
|
||
|
~
|
||
|
!!! An interface may only extend a class or another interface.
|
||
|
interface I2<T, U> extends U { }
|
||
|
~
|
||
|
!!! An interface may only extend a class or another interface.
|
||
|
|
||
|
|