mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
77 lines
3.3 KiB
Plaintext
77 lines
3.3 KiB
Plaintext
constructorParameterProperties2.ts(2,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
constructorParameterProperties2.ts(10,5): error TS2300: Duplicate identifier 'y'.
|
|
constructorParameterProperties2.ts(10,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
constructorParameterProperties2.ts(11,24): error TS2300: Duplicate identifier 'y'.
|
|
constructorParameterProperties2.ts(18,5): error TS2300: Duplicate identifier 'y'.
|
|
constructorParameterProperties2.ts(18,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
constructorParameterProperties2.ts(18,5): error TS2687: All declarations of 'y' must have identical modifiers.
|
|
constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'.
|
|
constructorParameterProperties2.ts(19,25): error TS2687: All declarations of 'y' must have identical modifiers.
|
|
constructorParameterProperties2.ts(26,5): error TS2300: Duplicate identifier 'y'.
|
|
constructorParameterProperties2.ts(26,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
constructorParameterProperties2.ts(26,5): error TS2687: All declarations of 'y' must have identical modifiers.
|
|
constructorParameterProperties2.ts(27,27): error TS2300: Duplicate identifier 'y'.
|
|
constructorParameterProperties2.ts(27,27): error TS2687: All declarations of 'y' must have identical modifiers.
|
|
|
|
|
|
==== constructorParameterProperties2.ts (14 errors) ====
|
|
class C {
|
|
y: number;
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
constructor(y: number) { } // ok
|
|
}
|
|
|
|
declare var c: C;
|
|
var r = c.y;
|
|
|
|
class D {
|
|
y: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
constructor(public y: number) { } // error
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
}
|
|
|
|
declare var d: D;
|
|
var r2 = d.y;
|
|
|
|
class E {
|
|
y: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
~
|
|
!!! error TS2687: All declarations of 'y' must have identical modifiers.
|
|
constructor(private y: number) { } // error
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
~
|
|
!!! error TS2687: All declarations of 'y' must have identical modifiers.
|
|
}
|
|
|
|
declare var e: E;
|
|
var r3 = e.y; // error
|
|
|
|
class F {
|
|
y: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
~
|
|
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
~
|
|
!!! error TS2687: All declarations of 'y' must have identical modifiers.
|
|
constructor(protected y: number) { } // error
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
~
|
|
!!! error TS2687: All declarations of 'y' must have identical modifiers.
|
|
}
|
|
|
|
declare var f: F;
|
|
var r4 = f.y; // error
|
|
|