@s-libs/app-state
    Preparing search index...

    Interface PersistenceCodec<State, Persisted>

    interface PersistenceCodec<State, Persisted> {
        decode: (persisted: Persisted) => State;
        encode: (state: State) => Persisted;
    }

    Type Parameters

    • State
    • Persisted
    Index

    Properties

    Properties

    decode: (persisted: Persisted) => State

    Convert from the format that is persisted to what is kept in the store.

    encode: (state: State) => Persisted

    Convert from the format that is kept in the store to what is persisted.