Description Defining a type predicate breaks inheritance for methods with mapped types
#56133
Types fail to relate to each other because the apparent type is used.
Last time, suggestion was to infer between mapped types before inferring from apparent types.
PR at Infer between generic mapped types before inferring from apparent type #56640 does this, but could cause issues where inferring apparent types would have been better than from the mapped type.
Specific example of a homomorphic mapped type inferring from a mapped type where the constraint type is array-like.
Do we feel like this is too breaky?
Can find ways to ensure that these types infer appropriately based on if the constraint is array-like.
There are questions about if the constructed example should even have been allowed.
Probably will go ahead with currently-implemented behavior in Infer between generic mapped types before inferring from apparent type #56640
Parentheses Affecting Conditional Type Distributivity
#56271
Always said you can stop distributivity in [square brackets].
type MapNumbers<T> = [T] extends [number] ? ... : ...
Some weirdnesses around TypeScript doing the same with parentheses.
It shouldn't, right?
Parentheses shouldn't affect semantics.
Reactions are currently unavailable
You can’t perform that action at this time.
Defining a type predicate breaks inheritance for methods with mapped types
#56133
Parentheses Affecting Conditional Type Distributivity
#56271
type MapNumbers<T> = [T] extends [number] ? ... : ...