mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
755 B
Plaintext
23 lines
755 B
Plaintext
derivedClassOverridesPrivateFunction1.ts(8,7): error TS2415: Class 'DerivedClass' incorrectly extends base class 'BaseClass'.
|
|
Types have separate declarations of a private property '_init'.
|
|
|
|
|
|
==== derivedClassOverridesPrivateFunction1.ts (1 errors) ====
|
|
class BaseClass {
|
|
constructor() {
|
|
this._init();
|
|
}
|
|
private _init() {
|
|
}
|
|
}
|
|
class DerivedClass extends BaseClass {
|
|
~~~~~~~~~~~~
|
|
!!! error TS2415: Class 'DerivedClass' incorrectly extends base class 'BaseClass'.
|
|
!!! error TS2415: Types have separate declarations of a private property '_init'.
|
|
constructor() {
|
|
super();
|
|
}
|
|
private _init() {
|
|
}
|
|
}
|
|
new DerivedClass(); |