mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
add new message - TS1258 (#30704)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
fed46ea3bf
commit
75a812b4db
@@ -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 &&
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user