fix(39245): change related diagnostic for missing rest parameter arguments (#39356)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Alexander T
2020-07-30 03:25:13 +03:00
committed by GitHub
parent 9b2d487392
commit bae111f0ae
6 changed files with 10 additions and 5 deletions

View File

@@ -26377,7 +26377,8 @@ namespace ts {
if (paramDecl) {
related = createDiagnosticForNode(
paramDecl,
isBindingPattern(paramDecl.name) ? Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : Diagnostics.An_argument_for_0_was_not_provided,
isBindingPattern(paramDecl.name) ? Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided :
isRestParameter(paramDecl) ? Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided : Diagnostics.An_argument_for_0_was_not_provided,
!paramDecl.name ? argCount : !isBindingPattern(paramDecl.name) ? idText(getFirstIdentifier(paramDecl.name)) : undefined
);
}

View File

@@ -4473,6 +4473,10 @@
"category": "Message",
"code": 6235
},
"Arguments for the rest parameter '{0}' were not provided.": {
"category": "Error",
"code": 6236
},
"Projects to reference": {
"category": "Message",