From b8af5248b56c7be37191317da0d16e059f49b820 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 4 Dec 2015 09:00:04 -0800 Subject: [PATCH] Simplify check for constructors --- src/compiler/checker.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 05041dcaeed..eef82b1032a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2938,10 +2938,6 @@ namespace ts { return type.resolvedBaseConstructorType; } - function hasClassOrInterfaceBaseType(type: InterfaceType): boolean { - return !!forEach(getBaseTypes(type), t => !!(t.symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface))); - } - function getBaseTypes(type: InterfaceType): ObjectType[] { const isClass = type.symbol.flags & SymbolFlags.Class; const isInterface = type.symbol.flags & SymbolFlags.Interface; @@ -3375,9 +3371,6 @@ namespace ts { } function getDefaultConstructSignatures(classType: InterfaceType): Signature[] { - if (!hasClassOrInterfaceBaseType(classType)) { - return [createSignature(undefined, classType.localTypeParameters, emptyArray, classType, undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false)]; - } const baseConstructorType = getBaseConstructorTypeOfClass(classType); const baseSignatures = getSignaturesOfType(baseConstructorType, SignatureKind.Construct); if(baseSignatures.length === 0) {