fix(51112): omit parameter names that precede the type (#51142)

This commit is contained in:
Oleksandr T
2022-10-13 23:37:23 +03:00
committed by GitHub
parent cf1b6b7333
commit 2da62a784b
3 changed files with 6 additions and 10 deletions

View File

@@ -40136,7 +40136,7 @@ namespace ts {
}
}
else {
forEach(jsdocParameters, ({ name }, index) => {
forEach(jsdocParameters, ({ name, isNameFirst }, index) => {
if (excludedParameters.has(index) || isIdentifier(name) && parameters.has(name.escapedText)) {
return;
}
@@ -40146,7 +40146,9 @@ namespace ts {
}
}
else {
errorOrSuggestion(isJs, name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, idText(name));
if (!isNameFirst) {
errorOrSuggestion(isJs, name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, idText(name));
}
}
});
}