mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
570 B
Plaintext
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. |