Rest of untyped binding pattern is back to any

This commit is contained in:
Nathan Shively-Sanders
2016-11-30 13:14:08 -08:00
parent 074ed9f8d6
commit f6ace2d83d

View File

@@ -3106,6 +3106,12 @@ 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)