Files
tsgo/testdata/baselines/reference/submodule/compiler/genericClasses0.errors.txt

16 lines
570 B
Plaintext

genericClasses0.ts(2,9): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
genericClasses0.ts(7,9): error TS2454: Variable 'v1' is used before being assigned.
==== genericClasses0.ts (2 errors) ====
class C<T> {
public x: T;
~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
}
var v1 : C<string>;
var y = v1.x; // should be 'string'
~~
!!! error TS2454: Variable 'v1' is used before being assigned.