mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 07:07:09 -05:00
report error for duplicate @type declaration (#38340)
This commit is contained in:
@@ -4911,6 +4911,14 @@
|
||||
"category": "Error",
|
||||
"code": 8032
|
||||
},
|
||||
"A JSDoc '@typedef' comment may not contain multiple '@type' tags.": {
|
||||
"category": "Error",
|
||||
"code": 8033
|
||||
},
|
||||
"The tag was first specified here.": {
|
||||
"category": "Error",
|
||||
"code": 8034
|
||||
},
|
||||
"Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause.": {
|
||||
"category": "Error",
|
||||
"code": 9002
|
||||
|
||||
@@ -7483,6 +7483,14 @@ namespace ts {
|
||||
}
|
||||
if (child.kind === SyntaxKind.JSDocTypeTag) {
|
||||
if (childTypeTag) {
|
||||
parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
||||
const lastError = lastOrUndefined(parseDiagnostics);
|
||||
if (lastError) {
|
||||
addRelatedInfo(
|
||||
lastError,
|
||||
createDiagnosticForNode(sourceFile, Diagnostics.The_tag_was_first_specified_here)
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user