Documentation
    Preparing search index...

    Interface IKV

    interface IKV {
        "[asyncIterator]": <T = unknown>() => AsyncIterableIterator<KvEntry<T>>;
        clear: () => Promise<void>;
        delete: (key: KvKey) => Promise<void>;
        get: <T = unknown>(key: KvKey) => Promise<undefined | T>;
        has: (key: KvKey) => Await<boolean>;
        list: <T = unknown>(
            selector: KvListSelector,
            options?: KvListOptions,
        ) => KvListIterator<KvEntry<T>>;
        onChange: <T = unknown>(
            key: KvKey,
            callback: (newValue?: T, oldValue?: T) => void,
            once?: boolean,
        ) => void;
        set: <T = unknown>(
            key: KvKey,
            value: T,
            options?: SetOptions,
        ) => Promise<IKV>;
    }
    Index

    Properties

    "[asyncIterator]": <T = unknown>() => AsyncIterableIterator<KvEntry<T>>
    clear: () => Promise<void>
    delete: (key: KvKey) => Promise<void>
    get: <T = unknown>(key: KvKey) => Promise<undefined | T>
    has: (key: KvKey) => Await<boolean>
    list: <T = unknown>(
        selector: KvListSelector,
        options?: KvListOptions,
    ) => KvListIterator<KvEntry<T>>
    onChange: <T = unknown>(
        key: KvKey,
        callback: (newValue?: T, oldValue?: T) => void,
        once?: boolean,
    ) => void
    set: <T = unknown>(key: KvKey, value: T, options?: SetOptions) => Promise<IKV>

    Set a value in the key-value store.

    Type Declaration