mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Component commits:
5810765259 Emit defineProperty calls before param prop assignments
Note that I restricted this to --useDefineForClassFields is true.
Nothing changes when it's off. I think this is the correct fix for a
patch release.
However, in principal there's nothing wrong with moving parameter
property initialisation after property declaration initialisation. It
would be Extremely Bad and Wrong to rely on this working:
```ts
class C {
p = this.q // what is q?
constructor(public q: number) { }
}
```
But today it does, and probably somebody relies on it without knowing.
ec7959091a Put parameter property initialiser into defineProperty's value
be863550b7 Merge branch 'master' into fix-defineProperty-parameter-property-emit
8ff59b98b8 Combine ES5/ESNext into one test