add new message - TS1258 (#30704)

This commit is contained in:
Alexander T
2019-04-03 09:49:34 -07:00
committed by Ryan Cavanaugh
parent fed46ea3bf
commit 75a812b4db
3 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -31462,7 +31462,7 @@ namespace ts {
}
if (node.exclamationToken && (node.parent.parent.kind !== SyntaxKind.VariableStatement || !node.type || node.initializer || node.flags & NodeFlags.Ambient)) {
return grammarErrorOnNode(node.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
return grammarErrorOnNode(node.exclamationToken, Diagnostics.Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation);
}
if (compilerOptions.module !== ModuleKind.ES2015 && compilerOptions.module !== ModuleKind.ESNext && compilerOptions.module !== ModuleKind.System && !compilerOptions.noEmit &&
+4
View File
@@ -847,6 +847,10 @@
"category": "Error",
"code": 1257
},
"Definite assignment assertions can only be used along with a type annotation.": {
"category": "Error",
"code": 1258
},
"'with' statements are not allowed in an async function block.": {
"category": "Error",
"code": 1300