ngrx-immer
Version:
Immer wrappers around NgRx methods createReducer, on, and ComponentStore
8 lines (6 loc) • 417 B
TypeScript
/**
* Helper method that wraps a reducer with the Immer `produce` method
* Kudos to Alex Okrushko {@link https://lookout.dev/rules/simple-immer-base-function-to-be-used-in-ngrx-store-or-componentstore-for-transforming-data-%22mutably%22}
*/
declare function immerReducer<State, Next>(callback: (state: State, next: Next) => State | void): (state: State | undefined, next: Next) => State;
export { immerReducer };