mizchi / hard-reducer

Type friendly reducer helper
56 stars 6 forks source link

Fix reducer type definition #18

Closed yuki-yano closed 5 years ago

yuki-yano commented 5 years ago

hard-reducer does not include undefined in State type

Type declaration of reducer in redux

export type Reducer<S = any, A extends Action = AnyAction> = (
  state: S | undefined,
  action: A
) => S
2019-02-23 3 10 13