mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 05:17:43 -05:00
Improve JSDoc @augments diagnostics (#19011)
This commit is contained in:
@@ -20034,7 +20034,7 @@ namespace ts {
|
||||
function checkJSDocAugmentsTag(node: JSDocAugmentsTag): void {
|
||||
const classLike = getJSDocHost(node);
|
||||
if (!isClassDeclaration(classLike) && !isClassExpression(classLike)) {
|
||||
error(classLike, Diagnostics.JSDoc_augments_is_not_attached_to_a_class_declaration);
|
||||
error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20049,7 +20049,7 @@ namespace ts {
|
||||
if (extend) {
|
||||
const className = getIdentifierFromEntityNameExpression(extend.expression);
|
||||
if (className && name.escapedText !== className.escapedText) {
|
||||
error(name, Diagnostics.JSDoc_augments_0_does_not_match_the_extends_1_clause, idText(name), idText(className));
|
||||
error(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3519,11 +3519,11 @@
|
||||
"category": "Error",
|
||||
"code": 8021
|
||||
},
|
||||
"JSDoc '@augments' is not attached to a class declaration.": {
|
||||
"JSDoc '@{0}' is not attached to a class.": {
|
||||
"category": "Error",
|
||||
"code": 8022
|
||||
},
|
||||
"JSDoc '@augments {0}' does not match the 'extends {1}' clause.": {
|
||||
"JSDoc '@{0} {1}' does not match the 'extends {2}' clause.": {
|
||||
"category": "Error",
|
||||
"code": 8023
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user