Skip to content
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

Typing error when using types with combineReducers from redux #42

Open
burhanuday opened this issue Mar 16, 2022 · 0 comments
Open

Typing error when using types with combineReducers from redux #42

burhanuday opened this issue Mar 16, 2022 · 0 comments

Comments

@burhanuday
Copy link

burhanuday commented Mar 16, 2022

Using the types from DefinitelyTyped, it creates the duck with the types

new Duck<Duck1, AnyObject, AnyObject, AnyObject, AnyObject, AnyObject, [], AnyObject>(options: DuckOptions<Duck1, ... 6 more ..., AnyObject>): Duck<...>

Which when i need to combine reducers, causes a type error

export default combineReducers({
  [Duck1.store]: Duck1.reducer,
  [Duck2.store]: Duck2.reducer,
});

Error says:

Argument of type '{ [x: string]: DuckReducer<Duck1, AnyObject, AnyObject, AnyObject, AnyObject, AnyObject, [], AnyObject> | DuckReducer<...>; }' is not assignable to parameter of type 'ReducersMapObject<{ [x: string]: ...; }, any>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant