You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to provide per element types using reverse mapped types when mapping over a type parameter with a tuple constraint. It works OK when at the argument position we use [...{ [K in keyof TTypes]: { /*...*/ } }] instead of { [K in keyof TTypes]: { /*...*/ } }. That is a weird workaround though.
π Expected behavior
I would expect the contextual types to be correctly provided for each element separately, just like in the case of [...{ [K in keyof TTypes]: { /*...*/ } }] (TS playground)
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
tuple constraint infer type parameter remapped reverse mapped contextual type
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
It should be possible to provide per element types using reverse mapped types when mapping over a type parameter with a tuple constraint. It works OK when at the argument position we use
[...{ [K in keyof TTypes]: { /*...*/ } }]
instead of{ [K in keyof TTypes]: { /*...*/ } }
. That is a weird workaround though.π Expected behavior
I would expect the contextual types to be correctly provided for each element separately, just like in the case of
[...{ [K in keyof TTypes]: { /*...*/ } }]
(TS playground)The text was updated successfully, but these errors were encountered: