@tempots/dom

StorageOptions type

Represents the properties required for storing and retrieving a value of type T.

Signature:

export type StorageOptions = {
    key: string;
    defaultValue: T | (() => T);
    serialize?: (v: T) => string;
    deserialize?: (v: string) => T;
    equals?: (a: T, b: T) => boolean;
    onLoad?: (value: T) => T;
};