File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2860,8 +2860,11 @@ namespace ts {
28602860 for (const signature of resolvedType.constructSignatures) {
28612861 typeElements.push(<ConstructSignatureDeclaration>signatureToSignatureDeclarationHelper(signature, SyntaxKind.ConstructSignature, context));
28622862 }
2863- if (resolvedType.stringIndexInfo) {
2864- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, IndexKind.String, context));
2863+ if (resolvedType.stringIndexInfo && !(resolvedType.objectFlags & ObjectFlags.Deferred)) {
2864+ const indexInfo = resolvedType.objectFlags & ObjectFlags.Deferred ?
2865+ createIndexInfo(emptyObjectType, resolvedType.stringIndexInfo.isReadonly, resolvedType.stringIndexInfo.declaration) :
2866+ resolvedType.stringIndexInfo;
2867+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(indexInfo, IndexKind.String, context));
28652868 }
28662869 if (resolvedType.numberIndexInfo) {
28672870 typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, IndexKind.Number, context));
You can’t perform that action at this time.
0 commit comments