From c2857672dcb70b9985220b374ffec6c018346c55 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 18 Jul 2016 15:57:06 -0700 Subject: [PATCH] Updated comment --- src/compiler/binder.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 782ed87c818..baa585fb9ba 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2643,8 +2643,9 @@ namespace ts { transformFlags |= TransformFlags.AssertTypeScript; } - // If a FunctionDeclaration is exported or its subtree has marked the container as - // needing to capture the lexical `this`, then this node is ES6 syntax. + // If a FunctionDeclaration's subtree has marked the container as needing to capture the + // lexical this, or the function contains parameters with initializers, then this node is + // ES6 syntax. if (subtreeFlags & TransformFlags.ES6FunctionSyntaxMask) { transformFlags |= TransformFlags.AssertES6; } @@ -2673,8 +2674,9 @@ namespace ts { transformFlags |= TransformFlags.AssertTypeScript; } - // If a FunctionExpression contains an asterisk token, or its subtree has marked the container - // as needing to capture the lexical this, then this node is ES6 syntax. + // If a FunctionExpression's subtree has marked the container as needing to capture the + // lexical this, or the function contains parameters with initializers, then this node is + // ES6 syntax. if (subtreeFlags & TransformFlags.ES6FunctionSyntaxMask) { transformFlags |= TransformFlags.AssertES6; }