Skip to content

Conversation

sandersn
Copy link
Member

Fixes #12203

  1. Retain function modifiers. They were previously dropped, breaking async transforms in ES2017.
  2. Do not emit __assign for object literals with no spreads, just visit children.
  3. Call aggregateTransformFlags after creating an __assign call.

1. Retain function modifiers. They were previously dropped.
2. Do not emit __assign for object literals with no spreads, just visit
children.
3. call aggregateTransformFlags after creating an __assign call.
@mhegazy
Copy link
Contributor

mhegazy commented Nov 14, 2016

@rbuckton can you take a look.

@@ -256,7 +260,7 @@ namespace ts {
visitEachChild(node.body, visitor, context);
return setOriginalNode(
createFunctionExpression(
/*modifiers*/ undefined,
node.modifiers,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't seem to be visiting methods or accessors in this transformer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Good point. I'll confirm that they don't work and put them in a separate PR I think.

@sandersn sandersn merged commit e50adc0 into master Nov 15, 2016
@sandersn sandersn deleted the fix-object-spread-rest-async-emit branch November 15, 2016 00:15
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants