travels
    Preparing search index...

    Interface ManualTravelsControls<S, F, P>

    interface ManualTravelsControls<
        S,
        F extends boolean,
        P extends PatchesOption = {},
    > {
        archive: (metadata?: TravelMetadata) => void;
        back: (amount?: number) => void;
        canArchive: () => boolean;
        canBack: () => boolean;
        canForward: () => boolean;
        forward: (amount?: number) => void;
        getHistory: () => Value<S, F>[];
        go: (position: number) => void;
        patches: TravelPatches<P>;
        position: number;
        reset: () => void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    archive: (metadata?: TravelMetadata) => void

    Archive the current state

    back: (amount?: number) => void

    Go back in the history

    canArchive: () => boolean

    Check if it's possible to archive the current state

    canBack: () => boolean

    Check if it's possible to go back

    canForward: () => boolean

    Check if it's possible to go forward

    forward: (amount?: number) => void

    Go forward in the history

    getHistory: () => Value<S, F>[]

    Get the history of the state

    go: (position: number) => void

    Go to a specific position in the history

    patches: TravelPatches<P>

    The patches of the history

    position: number

    The current position in the history

    reset: () => void

    Reset the history