TravelsEvent<S, P>
Travels 3.0.1. Travels 3 API reference for TravelsEvent.
TravelsEvent<
S,P> =object
Defined in: src/type.ts:297
Type Parameters
S
S
P
P extends PatchesOption = { }
Properties
historyLength
readonlyhistoryLength:number
Defined in: src/type.ts:314
Number of entries currently retained in history.
metadata?
readonlyoptionalmetadata:Readonly<TravelMetadata>
Defined in: src/type.ts:316
Lazily cloned, shallow-frozen metadata shared by this event's observers.
patches
readonlypatches:ReadonlyTravelPatches<P>
Defined in: src/type.ts:312
Lazily materialized event-local patches that transform the previously published state. Treat the shared snapshot as read-only.
position
readonlyposition:number
Defined in: src/type.ts:307
state
readonlystate:ReadonlyState<S>
Defined in: src/type.ts:306
Borrowed live state view. Mutate state only through Travels operations.
type
readonlytype:TravelsEventType
Defined in: src/type.ts:304
The committed operation. Handle unrecognized values in a default branch.