Commit bfc4e95
Move the initializer into the constructor for instance members that r… (#2867)
…eference identifiers declared in the constructor.
When TypeScript outputs modern language features, the below case throws
an TS error.
class C {
a = this.x; // TS2729: Property 'x' is used before its initialization.
constructor(public x:number){}
}
This error is fixed by moving the initializer of such class members into
the constructor.
This is a no-op change. This change came from Google.
---------
Co-authored-by: Barry Jaspan <[email protected]>
Co-authored-by: Andreas Arvidsson <[email protected]>1 parent fd82a52 commit bfc4e95
1 file changed
+35
-35
lines changed
0 commit comments