-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tuple type spread #17884
tuple type spread #17884
Conversation
The challenge I'm facing here is re-evaluating the parent tuple after generics are known, so I could spread out the generic's tuple over the parent tuple. I've yet to really figure this out. |
Fixes the third part of microsoft#5453, needed to effectively type `bind` (Function.prototype), `curry` and `compose`. Depends on microsoft#17961 type calls, microsoft#17884 type spread and microsoft#18004 tuple spread. The first 2/3 are included, so changes will look more cluttered here though new changes just span 10 lines over 2 functions. Will properly test this when those are ready -- now still broken.
22b5361
to
57a3e46
Compare
Thanks for your contribution. This PR has not been updated in a while and cannot be automatically merged at the time being. For housekeeping purposes we are closing stale PRs. If you'd still like to continue working on this PR, please leave a message and one of the maintainers can reopen it. |
For posterity, #24897 (comment) offers an alternative we can use today. |
This tuple type spread is part of my attempt at tackling #5453 following the tuple-flavored variant of the proposal laid out by @Artazor.
It adds a new spread node as a type-level equivalent of the one for the expression level. This could potentially be reused for another part of #5453 that'd require #6606, spreads in type-level function 'application' e.g.
Fn(...Args)
.Progress: evaluation with generics delayed too much.