mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Check for ClassDeclaration in getBaseTypeNodeOfClass
Previously, it just used valueDeclaration. Now, it searches the declarations.
This commit is contained in:
@@ -2766,7 +2766,10 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getBaseTypeNodeOfClass(type: InterfaceType): ExpressionWithTypeArguments {
|
||||
return getClassExtendsHeritageClauseElement(<ClassLikeDeclaration>type.symbol.valueDeclaration);
|
||||
let classDeclaration = getDeclarationOfKind(type.symbol, SyntaxKind.ClassDeclaration);
|
||||
if (classDeclaration) {
|
||||
return getClassExtendsHeritageClauseElement(classDeclaration as ClassLikeDeclaration);
|
||||
}
|
||||
}
|
||||
|
||||
function getConstructorsForTypeArguments(type: ObjectType, typeArgumentNodes: TypeNode[]): Signature[] {
|
||||
|
||||
Reference in New Issue
Block a user