Skip to main content
Version: Current

PatchFn

@rotorsoft/act-root


@rotorsoft/act-root / act/src / PatchFn

Type Alias: PatchFn

PatchFn = <TState, TEvents, TActions>(me, state, partial, event) => TState

Defined in: libs/act/src/types/action.ts:1324

The patch step: merges a reducer's partial into state, one per app, never per event. The builder always uses a bare merge; me and event name the reduction for a patch step that reports on it.

Type Parameters​

TState​

TState extends Schema

TEvents​

TEvents extends Schemas

TActions​

TActions extends Schemas

Parameters​

me​

State<TState, TEvents, TActions>

state​

TState

partial​

Readonly<Patch<TState>>

event​

Committed<TEvents, keyof TEvents>

Returns​

TState