typedReducer<A, S> function

Reducer<S> typedReducer<A, S>(
  1. TypedReducer<A, S> reducer
)

Implementation

Reducer<S> typedReducer<A, S>(
  TypedReducer<A, S> reducer
) => (dynamic action, S previousState) async {
  return action is A?
    await reducer(action, previousState)
    : previousState;
};