AggregateStateResult<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue> >.ok constructor
AggregateStateResult<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue> >.ok ({
- required TState current,
- required TState previous,
Implementation
factory AggregateStateResult.ok({
required TState current,
required TState previous,
}) =>
previous == current
? AggregateStateNoOp<TEvent, TValue, TId, TState>(current)
: AggregateStateOk<TEvent, TValue, TId, TState>(
current: current,
previous: previous,
);