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