AggregateCreator<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue> , TAggregate extends Aggregate<TEvent, TValue, TId, TState> > typedef
AggregateCreator<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue> , TAggregate extends Aggregate<TEvent, TValue, TId, TState> > =
TAggregate Function(TId id, [TState? state])
Aggregate instance creator method. If state
is
not given, a new AggregateState instance must be
created.
Implementation
typedef AggregateCreator<
TEvent extends Object,
TValue extends Object,
TId extends AggregateId,
TState extends AggregateState<TValue>,
TAggregate extends Aggregate<TEvent, TValue, TId, TState>>
= TAggregate Function(TId id, [TState? state]);