create<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue> , TAggregate extends Aggregate<TEvent, TValue, TId, TState> > static method
TAggregate
create<TEvent extends Object, TValue extends Object, TId extends AggregateId, TState extends AggregateState<TValue> , TAggregate extends Aggregate<TEvent, TValue, TId, TState> >(
- TId id, [
- TState? state
Create Aggregate of type
from given event
Implementation
static TAggregate create<
TEvent extends Object,
TValue extends Object,
TId extends AggregateId,
TState extends AggregateState<TValue>,
TAggregate extends Aggregate<TEvent, TValue, TId, TState>>(TId id,
[TState? state]) =>
(_creators[typeOf<TAggregate>()]
as AggregateCreator<TEvent, TValue, TId, TState, TAggregate>)(
id, state);