mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
getEffectiveBaseTypeNode: only use JSDoc augments if there is extends (#29349)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
7c096576bc
commit
12edac0925
@@ -2514,14 +2514,15 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function getEffectiveBaseTypeNode(node: ClassLikeDeclaration | InterfaceDeclaration) {
|
||||
if (isInJSFile(node)) {
|
||||
const baseType = getClassExtendsHeritageElement(node);
|
||||
if (baseType && isInJSFile(node)) {
|
||||
// Prefer an @augments tag because it may have type parameters.
|
||||
const tag = getJSDocAugmentsTag(node);
|
||||
if (tag) {
|
||||
return tag.class;
|
||||
}
|
||||
}
|
||||
return getClassExtendsHeritageElement(node);
|
||||
return baseType;
|
||||
}
|
||||
|
||||
export function getClassExtendsHeritageElement(node: ClassLikeDeclaration | InterfaceDeclaration) {
|
||||
|
||||
Reference in New Issue
Block a user