investtools/extensible-duck

Typing error when using types with combineReducers from redux

Opened this issue · 0 comments

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>'