@rosschiu/kiban-sdk
    Preparing search index...

    Interface StorageAdapter

    Minimal key-value storage contract — same shape as Storage (localStorage/sessionStorage) but engine-agnostic, so tests can inject createMemoryStorage and non-browser hosts can inject anything else.

    interface StorageAdapter {
        getItem(key: string): string | null;
        removeItem(key: string): void;
        setItem(key: string, value: string): void;
    }
    Index
    • Reads key, or null if unset.

      Parameters

      • key: string

      Returns string | null

    • Deletes key, if present.

      Parameters

      • key: string

      Returns void

    • Writes key.

      Parameters

      • key: string
      • value: string

      Returns void