mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
c021b28597
Component commits:5810765259Emit 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.ec7959091aPut parameter property initialiser into defineProperty's valuebe863550b7Merge branch 'master' into fix-defineProperty-parameter-property-emit8ff59b98b8Combine ES5/ESNext into one test