Skip to content

Fix microsoft/TypeScript#27864 #15

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

Closed
wants to merge 5 commits into from

Conversation

joeywatts
Copy link
Owner

Fixes binding of computed property names and provides a mechanism to hoist things at a block-level.

Moves the transformation of class properties to the ESNext transformer.

Property initializers are moved to the constructor by the TypeScript transformer only if there is constructor parameter properties. This is to preserve property initialization order.

It currently does not produce void 0 initializers for property declarations that have no initializer due to ESNext and TypeScript having different runtime behaviors. TS completely elides property declarations with no initializer, while I believe the ESNext would define that property on the instance with an undefined value (which is observable at runtime - propertyName in instance or for (var prop in instance) {}).
@joeywatts joeywatts changed the base branch from esnext-private-instance-fields to class-properties-esnext November 15, 2018 21:37
Joseph Watts and others added 2 commits November 20, 2018 20:25
Signed-off-by: Joseph Watts <[email protected]>
Max Heiber and others added 2 commits November 20, 2018 20:46
I couldn't get the evaluator.evaluateTypeScript
function to do codegen when there is a syntax
error, even with the `noEmitOnError: false` compiler
option.

Signed-off-by: Max Heiber <[email protected]>
Signed-off-by: Joseph Watts <[email protected]>
@joeywatts
Copy link
Owner Author

Closing (opened bloomberg#14)

@joeywatts joeywatts closed this Nov 21, 2018
joeywatts pushed a commit that referenced this pull request Jan 23, 2019
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.

2 participants