@tempots/dom

StoredPropOptions type

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

Signature:

export type StoredPropOptions = {
    key: string;
    defaultValue: T | (() => T);
    store: {
        getItem: (key: string) => string | null;
        setItem: (key: string, value: string) => void;
    };
    serialize?: (v: T) => string;
    deserialize?: (v: string) => T;
    equals?: (a: T, b: T) => boolean;
    onLoad?: (value: T) => T;
};