mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Support partial reverse mapped inferences with tuple types (#41106)
* Support partial reverse mapped inferences with tuple types * Add tests * Accept new baselines
This commit is contained in:
@@ -19709,7 +19709,8 @@ namespace ts {
|
||||
// arrow function, but is considered partially inferable because property 'a' has an inferable type.
|
||||
function isPartiallyInferableType(type: Type): boolean {
|
||||
return !(getObjectFlags(type) & ObjectFlags.NonInferrableType) ||
|
||||
isObjectLiteralType(type) && some(getPropertiesOfType(type), prop => isPartiallyInferableType(getTypeOfSymbol(prop)));
|
||||
isObjectLiteralType(type) && some(getPropertiesOfType(type), prop => isPartiallyInferableType(getTypeOfSymbol(prop))) ||
|
||||
isTupleType(type) && some(getTypeArguments(type), isPartiallyInferableType);
|
||||
}
|
||||
|
||||
function createReverseMappedType(source: Type, target: MappedType, constraint: IndexType) {
|
||||
|
||||
Reference in New Issue
Block a user