EventAdapter
Defined in: src/persistence/migration/Adapter.ts:53
Adapter for PersistentActor events. DomainEvent is the current
event union the actor knows; JournalShape defaults to the same type
but may diverge if the user wants to store a slimmer wire representation.
Type Parameters
Section titled “Type Parameters”DomainEvent
Section titled “DomainEvent”DomainEvent
JournalShape
Section titled “JournalShape”JournalShape = DomainEvent
Methods
Section titled “Methods”fromJournal()
Section titled “fromJournal()”fromJournal(
stored):DomainEvent
Defined in: src/persistence/migration/Adapter.ts:59
Inverse: take any past version off disk, return a current-version domain event.
Parameters
Section titled “Parameters”stored
Section titled “stored”StoredFrame
Returns
Section titled “Returns”DomainEvent
manifest()
Section titled “manifest()”manifest(
event):string
Defined in: src/persistence/migration/Adapter.ts:55
Stable identifier for the current event variant — used as _t on disk.
Parameters
Section titled “Parameters”DomainEvent
Returns
Section titled “Returns”string
toJournal()
Section titled “toJournal()”toJournal(
event):OutboundFrame<JournalShape>
Defined in: src/persistence/migration/Adapter.ts:57
Convert a domain event to the journal triple.
Parameters
Section titled “Parameters”DomainEvent
Returns
Section titled “Returns”OutboundFrame<JournalShape>