travels3.0
API ReferenceType Aliases

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

readonly historyLength: number

Defined in: src/type.ts:314

Number of entries currently retained in history.


metadata?

readonly optional metadata: Readonly<TravelMetadata>

Defined in: src/type.ts:316

Lazily cloned, shallow-frozen metadata shared by this event's observers.


patches

readonly patches: 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

readonly position: number

Defined in: src/type.ts:307


state

readonly state: ReadonlyState<S>

Defined in: src/type.ts:306

Borrowed live state view. Mutate state only through Travels operations.


type

readonly type: TravelsEventType

Defined in: src/type.ts:304

The committed operation. Handle unrecognized values in a default branch.

On this page