@@ -5657,17 +5657,12 @@ namespace ts {
5657
5657
else {
5658
5658
// Combinations of function, class, enum and module
5659
5659
let members = emptySymbols;
5660
- let constructSignatures: Signature[] = emptyArray;
5661
5660
let stringIndexInfo: IndexInfo = undefined;
5662
5661
if (symbol.exports) {
5663
5662
members = getExportsOfSymbol(symbol);
5664
5663
}
5665
5664
if (symbol.flags & SymbolFlags.Class) {
5666
5665
const classType = getDeclaredTypeOfClassOrInterface(symbol);
5667
- constructSignatures = getSignaturesOfSymbol(symbol.members.get(InternalSymbolName.Constructor));
5668
- if (!constructSignatures.length) {
5669
- constructSignatures = getDefaultConstructSignatures(classType);
5670
- }
5671
5666
const baseConstructorType = getBaseConstructorTypeOfClass(classType);
5672
5667
if (baseConstructorType.flags & (TypeFlags.Object | TypeFlags.Intersection | TypeFlags.TypeVariable)) {
5673
5668
members = createSymbolTable(getNamedMembers(members));
@@ -5678,14 +5673,23 @@ namespace ts {
5678
5673
}
5679
5674
}
5680
5675
const numberIndexInfo = symbol.flags & SymbolFlags.Enum ? enumNumberIndexInfo : undefined;
5681
- setStructuredTypeMembers(type, members, emptyArray, constructSignatures , stringIndexInfo, numberIndexInfo);
5676
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray , stringIndexInfo, numberIndexInfo);
5682
5677
// We resolve the members before computing the signatures because a signature may use
5683
5678
// typeof with a qualified name expression that circularly references the type we are
5684
5679
// in the process of resolving (see issue #6072). The temporarily empty signature list
5685
5680
// will never be observed because a qualified name can't reference signatures.
5686
5681
if (symbol.flags & (SymbolFlags.Function | SymbolFlags.Method)) {
5687
5682
(<ResolvedType>type).callSignatures = getSignaturesOfSymbol(symbol);
5688
5683
}
5684
+ // And likewise for construct signatures for classes
5685
+ if (symbol.flags & SymbolFlags.Class) {
5686
+ const classType = getDeclaredTypeOfClassOrInterface(symbol);
5687
+ let constructSignatures = getSignaturesOfSymbol(symbol.members.get(InternalSymbolName.Constructor));
5688
+ if (!constructSignatures.length) {
5689
+ constructSignatures = getDefaultConstructSignatures(classType);
5690
+ }
5691
+ (<ResolvedType>type).constructSignatures = constructSignatures;
5692
+ }
5689
5693
}
5690
5694
}
5691
5695
0 commit comments