19 lines
911 B
Text
19 lines
911 B
Text
|
tests/cases/compiler/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.ts(8,17): error TS2314: Generic type 'A<T1, T2>' requires 2 type argument(s).
|
||
|
tests/cases/compiler/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.ts(9,21): error TS2335: 'super' can only be referenced in a derived class.
|
||
|
|
||
|
|
||
|
==== tests/cases/compiler/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.ts (2 errors) ====
|
||
|
|
||
|
class A<T1, T2> {
|
||
|
constructor(private map: (value: T1) => T2) {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class B extends A<number> {
|
||
|
~~~~~~~~~
|
||
|
!!! error TS2314: Generic type 'A<T1, T2>' requires 2 type argument(s).
|
||
|
constructor() { super(value => String(value)); }
|
||
|
~~~~~
|
||
|
!!! error TS2335: 'super' can only be referenced in a derived class.
|
||
|
}
|