Chok’s Typescript Utilities
    Preparing search index...

    Type Alias StorageAdapter<T>

    Most basic interface for a storage implementation. This is designed to be quite easily implemented by users to plug in any new underlying storage.

    type StorageAdapter<T> = {
        clear: () => Promise<void> | void;
        delete: (key: string) => Promise<void> | void;
        get: (key: string) => Promise<T | undefined> | T | undefined;
        set: (key: string, value: T) => Promise<void> | void;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    clear: () => Promise<void> | void
    delete: (key: string) => Promise<void> | void
    get: (key: string) => Promise<T | undefined> | T | undefined
    set: (key: string, value: T) => Promise<void> | void