diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0e023fc2ac5b9..9c25ba4aee683 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21457,7 +21457,7 @@ namespace ts { node.typeExpression && node.typeExpression.type && !isArrayType(getTypeFromTypeNode(node.typeExpression.type))) { error(node.name, - Diagnostics.The_last_param_tag_of_a_function_that_uses_arguments_must_have_an_array_type, + Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(node.name.kind === SyntaxKind.QualifiedName ? node.name.right : node.name)); } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index d0e97d188a316..f4f7587b78ac9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3720,7 +3720,7 @@ "category": "Error", "code": 8028 }, - "The last @param tag of a function that uses 'arguments' must have an array type.": { + "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type.": { "category": "Error", "code": 8029 }, diff --git a/tests/baselines/reference/paramTagOnFunctionUsingArguments.errors.txt b/tests/baselines/reference/paramTagOnFunctionUsingArguments.errors.txt index f9ad715c49b66..bcbeb125338ce 100644 --- a/tests/baselines/reference/paramTagOnFunctionUsingArguments.errors.txt +++ b/tests/baselines/reference/paramTagOnFunctionUsingArguments.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsdoc/a.js(2,20): error TS8029: The last @param tag of a function that uses 'arguments' must have an array type. +tests/cases/conformance/jsdoc/a.js(2,20): error TS8029: JSDoc '@param' tag has name 'first', but there is no parameter with that name. It would match 'arguments' if it had an array type. tests/cases/conformance/jsdoc/a.js(19,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'string'. @@ -8,7 +8,7 @@ tests/cases/conformance/jsdoc/a.js(19,9): error TS2345: Argument of type '1' is /** * @param {string} first ~~~~~ -!!! error TS8029: The last @param tag of a function that uses 'arguments' must have an array type. +!!! error TS8029: JSDoc '@param' tag has name 'first', but there is no parameter with that name. It would match 'arguments' if it had an array type. */ function concat(/* first, second, ... */) { var s = ''