Fix printing of deferred mapped types' index signatures

This commit is contained in:
Nathan Shively-Sanders committed 2018-01-03 16:10:26 -08:00
1 parent 81a601bb49
commit 9aa5443bbc
3 files changed
+27 -27

No files matched your search

+1 -1
View File
@@ -2860,7 +2860,7 @@ namespace ts {
for (const signature of resolvedType.constructSignatures) {
typeElements.push(<ConstructSignatureDeclaration>signatureToSignatureDeclarationHelper(signature, SyntaxKind.ConstructSignature, context));
}
if (resolvedType.stringIndexInfo && !(resolvedType.objectFlags & ObjectFlags.Deferred)) {
if (resolvedType.stringIndexInfo) {
const indexInfo = resolvedType.objectFlags & ObjectFlags.Deferred ?
createIndexInfo(emptyObjectType, resolvedType.stringIndexInfo.isReadonly, resolvedType.stringIndexInfo.declaration) :
resolvedType.stringIndexInfo;