-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable the class fields transform when disableESTransforms is set
When disableESTransforms is specified, the class transform can almost entirely be skipped, but we still need to do some work: * TS constructor initializers (e.g. constructor params with `readonly` or `private`) need to be transformed to assignments within the constructor. * Fields marked `declare` need to be removed. Uninitialized fields not marked declare are preserved, matching the ES spec and the `useDefineForClassFields` flag in TS. For now, we still use the `getClassInfo` code path but give alternate results. In the future we can hopefully simplify that code path, and possibly change `declare` parsing so the whole line consists of type tokens that will naturally be erased.
- Loading branch information
1 parent
6b6c0d7
commit 333f9be
Showing
6 changed files
with
195 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters