ngrx-reducer-effects
Version:
Return side-effects as data from your NgRx reducers
8 lines (7 loc) • 382 B
TypeScript
import { Action } from '@ngrx/store';
import { StateWithEffects } from './state-with-effects';
export declare type ActionReducerMap<T, V extends Action = Action> = {
[p in keyof T]: ActionReducer<T[p]>;
};
export declare type ReducerResult<T> = T | StateWithEffects<T, any>;
export declare type ActionReducer<T> = (state: T | undefined, action: any) => ReducerResult<T>;