From 08c78fbe76d87d0e15ca67ac106583e9687ff9cb Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 8 Oct 2015 16:39:53 -0700 Subject: [PATCH] Check for ClassDeclaration in getBaseTypeNodeOfClass Previously, it just used valueDeclaration. Now, it searches the declarations. --- src/compiler/checker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 551f428ca9a..86754ff93d0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2766,7 +2766,10 @@ namespace ts { } function getBaseTypeNodeOfClass(type: InterfaceType): ExpressionWithTypeArguments { - return getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration); + let classDeclaration = getDeclarationOfKind(type.symbol, SyntaxKind.ClassDeclaration); + if (classDeclaration) { + return getClassExtendsHeritageClauseElement(classDeclaration as ClassLikeDeclaration); + } } function getConstructorsForTypeArguments(type: ObjectType, typeArgumentNodes: TypeNode[]): Signature[] {