travels
    Preparing search index...

    Type Alias TravelsDeserializeOptions<S, P>

    type TravelsDeserializeOptions<S, P extends PatchesOption = {}> = {
        fallback?:
            | TravelsSerializedHistory<S, P>
            | (() => TravelsSerializedHistory<S, P>);
        migrate?: TravelsMigration<S, P>;
        onError?: (error: Error) => void;
    }

    Type Parameters

    Index

    Properties

    fallback?:
        | TravelsSerializedHistory<S, P>
        | (() => TravelsSerializedHistory<S, P>)

    Fallback snapshot used when parsing, migration, or validation fails.

    migrate?: TravelsMigration<S, P>

    Migrate old persisted snapshots into the current schema before validation.

    onError?: (error: Error) => void

    Receive typed persistence errors before a fallback is returned or the error is thrown.