StateFilesSavingEvent
Hierarchy
- StateEvent<{ stateFiles: Parameters<IStateProvider[saveStates]>[0] }>
- StateFilesSavingEvent
Index
Constructors
Properties
Constructors
constructor
Parameters
optionalname: string
The subject of the event, when the event type alone does not identify it.
optionalpayload: { stateFiles: ({ data: Buffer<ArrayBufferLike> | undefined; stateFileName: string } | { filePath: string; stateFileName: string })[] }
The event's data.
stateFiles: ({ data: Buffer<ArrayBufferLike> | undefined; stateFileName: string } | { filePath: string; stateFileName: string })[]
Returns StateFilesSavingEvent
Properties
readonlyinheritedheader
When the event was created. sequence counts every event this process created, so it orders
two events created in the same millisecond, and events a late listener receives replayed.
Type declaration
sequence: number
timestamp: number
readonlyinheritedname
The subject of the event, when the event type alone does not identify it - e.g. the class name on a registration event. Empty otherwise.
readonlyinheritedpayload
The event's data. Its shape is fixed by the event type.
Type declaration
stateFiles: ({ data: Buffer<ArrayBufferLike> | undefined; stateFileName: string } | { filePath: string; stateFileName: string })[]
This event is emitted before state files are written. A listener that returns a promise is awaited, and may add files to
stateFiles, which are then written in the same change.Events/State