mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-13 14:09:06 -05:00
Rest of untyped binding pattern is back to any
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user