-
-
Notifications
You must be signed in to change notification settings - Fork 419
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(types): improve the accuracy of dispatcher inference #937
Conversation
The building process was blocked by rollup because it throws some TS errors(these errors didn't appear in my local with ts@4.4.2), can you have a look? @semoal I want to formate the |
Co-authored-by: tianzhich <zhi.tian@yahoo.com>
size-limit report 📦
|
Feel free to merge when you feel comfortable with :) |
I still getting this issue on export const beepModel = createModel<RootModel>()(
{
state: <BeepModel>{
visible: false
},
reducers: {
showBeep: (state): void => {
state.visible = true
},
hideBeep: (state): void => {
state.visible = false
}
},
}
)
dispatch.beep.showBeep() // throws "Expected 2 arguments, but got 0." But works when adding emtpy |
@ardyfeb What's your ts version? You should update it to ^4.4. |
@tianzhich i using typescript |
Could you create a reproduce repo or sandbox? The codes you posted above works in our tests. |
payload
defined asany
type Typescript error occurred after upgrading the project to version 2.0 #936undefined
type.