Interface PersistenceCodec<State, Persisted>

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

Type Parameters

  • State
  • Persisted

Properties

Properties

decode: ((persisted) => State)

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

Type declaration

encode: ((state) => Persisted)

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

Type declaration