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 {
2643
2643
transformFlags |= TransformFlags . AssertTypeScript ;
2644
2644
}
2645
2645
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.
2648
2649
if ( subtreeFlags & TransformFlags . ES6FunctionSyntaxMask ) {
2649
2650
transformFlags |= TransformFlags . AssertES6 ;
2650
2651
}
@@ -2673,8 +2674,9 @@ namespace ts {
2673
2674
transformFlags |= TransformFlags . AssertTypeScript ;
2674
2675
}
2675
2676
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.
2678
2680
if ( subtreeFlags & TransformFlags . ES6FunctionSyntaxMask ) {
2679
2681
transformFlags |= TransformFlags . AssertES6 ;
2680
2682
}
You can’t perform that action at this time.
0 commit comments