From cd8c86dd38d6e64ded30ed6ccc2baf2cd8412803 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 15 Jan 2020 14:33:09 -0800 Subject: [PATCH] Revert "Remove "unnecessary" type assertions." This reverts commit 5dccbb7026e63813ab8a0a7455ffddc18ac95ca8. --- src/compiler/checker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index debf488275b17..0a1df2aa8cb52 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -30102,8 +30102,8 @@ namespace ts { if (node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.BindingElement) { checkVarDeclaredNamesNotShadowed(node); } - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); + checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -35268,10 +35268,10 @@ namespace ts { node.kind === SyntaxKind.FunctionExpression || node.kind === SyntaxKind.MethodDeclaration); if (node.flags & NodeFlags.Ambient) { - return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); + return grammarErrorOnNode(node.asteriskToken!, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { - return grammarErrorOnNode(node.asteriskToken, Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); + return grammarErrorOnNode(node.asteriskToken!, Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } } }