26 lines
No EOL
1.2 KiB
Text
26 lines
No EOL
1.2 KiB
Text
tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(7,9): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(8,9): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
|
tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(9,11): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
|
tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts(10,11): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
|
|
|
|
==== tests/cases/compiler/genericTypeReferencesRequireTypeArgs.ts (4 errors) ====
|
|
class C<T> {
|
|
foo(): T { return null }
|
|
}
|
|
interface I<T> {
|
|
bar(): T;
|
|
}
|
|
var c1: C; // error
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
var i1: I; // error
|
|
~
|
|
!!! error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
|
var c2: C<I>; // should be an error
|
|
~
|
|
!!! error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
|
var i2: I<C>; // should be an error
|
|
~
|
|
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
|
|