mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
563 B
Plaintext
16 lines
563 B
Plaintext
checkSuperCallBeforeThisAccessing2.ts(5,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
|
|
|
|
|
|
==== checkSuperCallBeforeThisAccessing2.ts (1 errors) ====
|
|
class Based { }
|
|
class Derived extends Based {
|
|
public x: number;
|
|
constructor() {
|
|
this.x = 100;
|
|
~~~~
|
|
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
|
|
super();
|
|
this.x = 10;
|
|
var that = this;
|
|
}
|
|
} |