EventGroup
Constructors
Guards
isEventGroup
Added in v1.0.0
Source
Signature
declare function isEventGroup(u: unknown): u is AnyModels
EventGroup
Added in v1.0.0
Source
EventGroup interface
Added in v1.0.0
Source
An EventGroup is a collection of Events. You can use an EventGroup to
represent a portion of your domain.
The events can be implemented later using the EventLogBuilder.group api.
Signature
interface EventGroup<out Events extends Event.Any = never> extends Pipeable { constructor(_: never); readonly [TypeId]: typeof TypeId; readonly events: Record.ReadonlyRecord<string, Events>; add<Tag extends string, Payload extends Any = Void, Success extends Any = Void, Error extends All = Never>(options: { readonly error?: Error; readonly payload?: Payload; readonly primaryKey: (payload: Type<Payload>) => string; readonly success?: Success; readonly tag: Tag; }): EventGroup<Events | Event<Tag, Payload, Success, Error>>; addError<Error extends Any>(error: Error): EventGroup<AddError<Events, Error>>;}