mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
derivedClassOverridesPrivates.ts(2,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
derivedClassOverridesPrivates.ts(5,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'.
|
|
Types have separate declarations of a private property 'x'.
|
|
derivedClassOverridesPrivates.ts(6,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
derivedClassOverridesPrivates.ts(13,7): error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'.
|
|
Types have separate declarations of a private property 'y'.
|
|
|
|
|
|
==== derivedClassOverridesPrivates.ts (4 errors) ====
|
|
class Base {
|
|
private x: { foo: string };
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
class Derived extends Base {
|
|
~~~~~~~
|
|
!!! error TS2415: Class 'Derived' incorrectly extends base class 'Base'.
|
|
!!! error TS2415: Types have separate declarations of a private property 'x'.
|
|
private x: { foo: string; bar: string; }; // error
|
|
~
|
|
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
class Base2 {
|
|
private static y: { foo: string };
|
|
}
|
|
|
|
class Derived2 extends Base2 {
|
|
~~~~~~~~
|
|
!!! error TS2417: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2'.
|
|
!!! error TS2417: Types have separate declarations of a private property 'y'.
|
|
private static y: { foo: string; bar: string; }; // error
|
|
} |