mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
classWithNoConstructorOrBaseClass.ts(2,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
classWithNoConstructorOrBaseClass.ts(9,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
classWithNoConstructorOrBaseClass.ts(10,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
|
|
|
|
==== classWithNoConstructorOrBaseClass.ts (3 errors) ====
|
|
class C {
|
|
x: string;
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
var c = new C();
|
|
var r = C;
|
|
|
|
class D<T,U> {
|
|
x: T;
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
y: U;
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
var d = new D();
|
|
var d2 = new D<string, number>();
|
|
var r2 = D;
|
|
|