25 lines
No EOL
1.2 KiB
Text
25 lines
No EOL
1.2 KiB
Text
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(4,20): error TS2304: Cannot find name 'T'.
|
|
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(5,24): error TS2304: Cannot find name 'U'.
|
|
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(7,24): error TS2312: An interface may only extend a class or another interface.
|
|
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(8,28): error TS2312: An interface may only extend a class or another interface.
|
|
|
|
|
|
==== 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 { }
|
|
~
|
|
!!! error TS2304: Cannot find name 'T'.
|
|
class C2<T, U> extends U { }
|
|
~
|
|
!!! error TS2304: Cannot find name 'U'.
|
|
|
|
interface I<T> extends T { }
|
|
~
|
|
!!! error TS2312: An interface may only extend a class or another interface.
|
|
interface I2<T, U> extends U { }
|
|
~
|
|
!!! error TS2312: An interface may only extend a class or another interface.
|
|
|
|
|