Generic storage interface

interface IStorage {
    clear(): Promise<void>;
    get(key: string): Promise<null | string>;
    keys(): Promise<string[]>;
    length(): Promise<number>;
    remove(key: string): Promise<void>;
    set(key: string, value: string): Promise<string>;
}

Implemented by

Methods

  • Parameters

    • key: string

    Returns Promise<null | string>

  • Returns Promise<string[]>

  • Returns Promise<number>

  • Parameters

    • key: string

    Returns Promise<void>

  • Parameters

    • key: string
    • value: string

    Returns Promise<string>