From 440d01f0bde14d13cc2ca054439caaadcb5009ac Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 9 Oct 2015 10:12:17 -0700 Subject: [PATCH] Fall back to valueDeclaration Fall back to `valueDeclaration` in getBaseTypeNodeOfClass when no ClassDeclaration exists. --- src/compiler/checker.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 86754ff93d0..6c233a57ef4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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[] {