mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Fall back to valueDeclaration
Fall back to `valueDeclaration` in getBaseTypeNodeOfClass when no ClassDeclaration exists.
This commit is contained in:
parent
08c78fbe76
commit
440d01f0bd
@ -2766,10 +2766,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getBaseTypeNodeOfClass(type: InterfaceType): ExpressionWithTypeArguments {
|
||||
let classDeclaration = getDeclarationOfKind(type.symbol, SyntaxKind.ClassDeclaration);
|
||||
if (classDeclaration) {
|
||||
return getClassExtendsHeritageClauseElement(classDeclaration as ClassLikeDeclaration);
|
||||
}
|
||||
let classDeclaration =
|
||||
getDeclarationOfKind(type.symbol, SyntaxKind.ClassDeclaration) || type.symbol.valueDeclaration;
|
||||
return getClassExtendsHeritageClauseElement(classDeclaration as ClassLikeDeclaration);
|
||||
}
|
||||
|
||||
function getConstructorsForTypeArguments(type: ObjectType, typeArgumentNodes: TypeNode[]): Signature[] {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user