Skip to content

Commit c285767

Browse files
committed
Updated comment
1 parent c832444 commit c285767

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/compiler/binder.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)