Revert "Remove "unnecessary" type assertions."

This reverts commit 5dccbb7026.
This commit is contained in:
Daniel Rosenwasser committed 2020-01-15 14:33:09 -08:00
1 parent 5dccbb7026
commit cd8c86dd38
1 file changed
+4 -4
+4 -4
View File
@@ -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, <Identifier>node.name);
checkCollisionWithGlobalPromiseInGeneratedCode(node, <Identifier>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);
}
}
}