Rest of untyped binding pattern is back to str index sig

This commit is contained in:
Nathan Shively-Sanders
2016-11-30 17:25:44 -08:00
parent 8e648f9f6d
commit ddf03bae3c

View File

@@ -3106,12 +3106,6 @@ namespace ts {
}
}
type = getRestType(parentType, literalMembers, declaration.symbol);
if (getPropertiesOfObjectType(type).length === 0 && getIndexTypeOfType(type, IndexKind.String) === anyType) {
if (compilerOptions.noImplicitAny) {
reportImplicitAnyError(declaration, anyType);
}
return anyType;
}
}
else {
// Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form)