-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Fix typings for compose
function to accept single rest argument
#1936
Conversation
Thanks! |
Without this commit the following code works:
Including the commit TypeScript now automatically selects |
@stephtr Filed an issue in TypeScript repo: microsoft/TypeScript#11343 |
Would it maybe be wise to revert this commit until the TypeScript issue is somehow solved? Because code written with the definition of Redux 3.6.0 (like the one above) needs to be changed to |
@stephtr How about |
In that case it has to be |
I just wanted to make a note what a technical challenge is to properly type
I was thinking about this and tried to prototype type flowing (state type, dispatch type) through enhancers composition and came up with a suggestion for the TypeScript team which seems very complicated even for just starting discussion :) I described the challenge and possible solution here microsoft/TypeScript#10247 please come there and bug TS team to pick it up for a design meeting. |
See https://github.com/reactjs/redux/blob/v3.7.0/index.d.ts See reduxjs/redux#1936 (comment) See Function composition challenge for type system microsoft/TypeScript#10247 See microsoft/TypeScript#9949
Fixes #1935.
Cc. @ulfryk @Igorbek