Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit defineProperty calls before param prop assignments #34987

Merged
merged 4 commits into from Nov 22, 2019

Commits on Nov 7, 2019

  1. 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.
    sandersn committed Nov 7, 2019
    Copy the full SHA
    5810765 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2019

  1. Copy the full SHA
    ec79590 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2019

  1. Copy the full SHA
    be86355 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    8ff59b9 View commit details
    Browse the repository at this point in the history