API Reference
API Reference
Complete source-generated reference for every public Travels 3 export.
This reference is generated from the published Travels package used by the website examples during the website build, so signatures, overloads, return capabilities, and source links match that release.
Looking for guidance?
Start with Configuration Options or Instance Methods for task-oriented explanations. Use this section when you need the exact type or overload.
Browse by export kind
Functions
Factories, restore functions, type guards, and validation helpers.
Classes
Operation, type, and persistence error classes.
Interfaces
Read-only controls and manual control surfaces.
Type Aliases
Timeline capabilities, events, snapshots, options, patches, and JSON types.
Variables
The persistence namespace and history schema version.
Most-used exports
| Export | Kind | Purpose |
|---|---|---|
createTravels() | Function | Create a state-owning timeline. |
createPatchableTravels() | Function | Create a timeline with durable-input constraints. |
createTravelJournal() | Function | Create an externally owned controlled journal. |
restoreTravels() | Function | Restore one complete state-owning snapshot. |
restoreTravelJournal() | Function | Restore one complete controlled journal snapshot. |
Travels | Namespace value | Decode persisted input with Travels.deserialize(). |
TravelsOptions | Type | Configure history, ownership, Mutative behavior, and hooks. |
TravelsEvent | Type | Consume committed subscriber and devtools events. |
TravelsSerializedHistory | Type | Store and migrate versioned snapshots. |
TravelsControls | Interface | Expose read-only navigation and history controls. |
TravelsPersistenceError | Class | Handle stable persistence failure codes. |
TRAVELS_HISTORY_SCHEMA_VERSION | Variable | Construct and migrate current-schema snapshots. |
Reference conventions
- “Defined in” links point to the exact source revision used to generate the page.
- Read-only return objects are capabilities, not constructor-based class instances.
Travelsthe exported value is a persistence namespace;Travels<...>the type describes a state-owning timeline.- Event names are open to future minor releases; keep a
defaultbranch in application switches. - Patch and state views described as read-only must not be cast and mutated. Use the corresponding detached snapshot API.