File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2643,8 +2643,9 @@ namespace ts {
26432643 transformFlags |= TransformFlags . AssertTypeScript ;
26442644 }
26452645
2646- // If a FunctionDeclaration is exported or its subtree has marked the container as
2647- // needing to capture the lexical `this`, then this node is ES6 syntax.
2646+ // If a FunctionDeclaration's subtree has marked the container as needing to capture the
2647+ // lexical this, or the function contains parameters with initializers, then this node is
2648+ // ES6 syntax.
26482649 if ( subtreeFlags & TransformFlags . ES6FunctionSyntaxMask ) {
26492650 transformFlags |= TransformFlags . AssertES6 ;
26502651 }
@@ -2673,8 +2674,9 @@ namespace ts {
26732674 transformFlags |= TransformFlags . AssertTypeScript ;
26742675 }
26752676
2676- // If a FunctionExpression contains an asterisk token, or its subtree has marked the container
2677- // as needing to capture the lexical this, then this node is ES6 syntax.
2677+ // If a FunctionExpression's subtree has marked the container as needing to capture the
2678+ // lexical this, or the function contains parameters with initializers, then this node is
2679+ // ES6 syntax.
26782680 if ( subtreeFlags & TransformFlags . ES6FunctionSyntaxMask ) {
26792681 transformFlags |= TransformFlags . AssertES6 ;
26802682 }
You can’t perform that action at this time.
0 commit comments