diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 2f00f66767f..e295ba11526 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -569,7 +569,7 @@ namespace ts { function visitThisKeyword(node: Node): Node { if (convertedLoopState) { if (hierarchyFacts & HierarchyFacts.ArrowFunction) { - // if the enclosing function is an ArrowFunction is then we use the captured 'this' keyword. + // if the enclosing function is an ArrowFunction then we use the captured 'this' keyword. convertedLoopState.containsLexicalThis = true; return node; } @@ -1445,6 +1445,10 @@ namespace ts { createVoidZero() ); break; + + default: + Debug.failBadSyntaxKind(node); + break; } const captureNewTargetStatement = createVariableStatement(