mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
fix error message with public class inside namespace
This commit is contained in:
@@ -16214,7 +16214,7 @@ namespace ts {
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
|
||||
}
|
||||
else if (node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) {
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_element, text);
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
|
||||
}
|
||||
else if (flags & NodeFlags.Abstract) {
|
||||
if (modifier.kind === SyntaxKind.PrivateKeyword) {
|
||||
@@ -16238,7 +16238,7 @@ namespace ts {
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
|
||||
}
|
||||
else if (node.parent.kind === SyntaxKind.ModuleBlock || node.parent.kind === SyntaxKind.SourceFile) {
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static");
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
|
||||
}
|
||||
else if (node.kind === SyntaxKind.Parameter) {
|
||||
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
"category": "Error",
|
||||
"code": 1043
|
||||
},
|
||||
"'{0}' modifier cannot appear on a module element.": {
|
||||
"'{0}' modifier cannot appear on a module or namespace element.": {
|
||||
"category": "Error",
|
||||
"code": 1044
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user