Interface Paginator<Entity, Params>

interface Paginator<Entity, Params = undefined> {
    "[asyncIterator]"(): AsyncIterator<
        Entity,
        undefined,
        undefined
        | string
        | Params,
    >;
    getDirection(): Direction;
    setDirection(direction: Direction): Paginator<Entity, Params>;
    then<TResult1 = Entity, TResult2 = never>(
        onfulfilled?:
            | null
            | (value: Entity) => TResult1 | PromiseLike<TResult1>,
        onrejected?: null | (reason: any) => TResult2 | PromiseLike<TResult2>,
    ): PromiseLike<TResult1 | TResult2>;
    values(): AsyncIterableIterator<Entity>;
}

Type Parameters

  • Entity
  • Params = undefined

Hierarchy

Methods

  • Returns AsyncIterator<Entity, undefined, undefined | string | Params>

  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type Parameters

    • TResult1 = Entity
    • TResult2 = never

    Parameters

    • Optionalonfulfilled: null | (value: Entity) => TResult1 | PromiseLike<TResult1>

      The callback to execute when the Promise is resolved.

    • Optionalonrejected: null | (reason: any) => TResult2 | PromiseLike<TResult2>

      The callback to execute when the Promise is rejected.

    Returns PromiseLike<TResult1 | TResult2>

    A Promise for the completion of which ever callback is executed.