19 lines
No EOL
670 B
Text
19 lines
No EOL
670 B
Text
==== 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.
|
|
|
|
|