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

useDefineForClassFields skips emit of ambient properties #35058

Merged

Commits on Nov 12, 2019

  1. useDefineForClassFields skips emit of ambient properties

    Previously:
    
    ```ts
    class C {
      declare p
    }
    ```
    
    would incorrectly emit
    
    ```js
    class C {
        constructor() {
            Object.defineProperty(this, "p", {
                enumerable: true,
                configurable: true,
                writable: true,
                value: void 0
            });
        }
    }
    ```
    
    when useDefineForClassFields was turned on (for targets <ESNext).
    sandersn committed Nov 12, 2019
    Copy the full SHA
    8ae5a8c View commit details
    Browse the repository at this point in the history
  2. Fix bug for ESNext as well

    This moves the check earlier in the pipeline.
    sandersn committed Nov 12, 2019
    Copy the full SHA
    0ec9c04 View commit details
    Browse the repository at this point in the history
  3. update baselines

    sandersn committed Nov 12, 2019
    Copy the full SHA
    e1aa034 View commit details
    Browse the repository at this point in the history