Interface IStorage<T>

interface IStorage<T> {
    all(): AsyncGenerator<T[], void, unknown>;
    rmd(id, func): Promise<boolean>;
    rmw<X>(id, func): Promise<X>;
}

Type Parameters

  • T

Implemented by

Methods

Methods

  • Returns AsyncGenerator<T[], void, unknown>

  • Parameters

    • id: string
    • func: ((item) => boolean)
        • (item): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns Promise<boolean>

  • Type Parameters

    • X

    Parameters

    • id: string
    • func: ((item) => X)
        • (item): X
        • Parameters

          • item: undefined | T

          Returns X

    Returns Promise<X>