Fix printing of deferred mapped types' index signatures

This commit is contained in:
Nathan Shively-Sanders
2018-01-03 16:10:26 -08:00
parent 81a601bb49
commit 9aa5443bbc
3 changed files with 27 additions and 27 deletions

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;