Skip to content

Conversation

typescript-bot
Copy link
Collaborator

This cherry-pick was triggerd by a request on #35058
Please review the diff and merge if no changes are unexpected.
You can view the cherry-pick log here.

cc @DanielRosenwasser

Component commits:
8ae5a8c 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).

0ec9c04 Fix bug for ESNext as well
This moves the check earlier in the pipeline.

e1aa034 update baselines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants