diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7e393c5a35a..31e4277f75f 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -509,7 +509,7 @@ namespace ts { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { - // The arrow function spans multiple lines, + // The arrow function spans multiple lines, // make the error span be the first line, inclusive. return createTextSpan(pos, getEndLinePosition(startLine, sourceFile) - pos + 1); } @@ -3462,7 +3462,8 @@ namespace ts { || kind === SyntaxKind.NullKeyword || kind === SyntaxKind.ThisKeyword || kind === SyntaxKind.TrueKeyword - || kind === SyntaxKind.SuperKeyword; + || kind === SyntaxKind.SuperKeyword + || kind === SyntaxKind.NonNullExpression; } export function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression {