InterfacePaginator<Entity, Params>

interface Paginator<Entity, Params> {
    [asyncIterator](): AsyncIterator<Entity, undefined, undefined | string | Params>;
    clone(): Paginator<Entity, Params>;
    getDirection(): Direction;
    next(params?: string | Params): Promise<IteratorResult<Entity, undefined>>;
    return(value: undefined | PromiseLike<undefined>): Promise<IteratorResult<Entity, undefined>>;
    setDirection(direction: Direction): Paginator<Entity, Params>;
    then<TResult1, TResult2>(onfulfilled?: null | ((value: Entity) => TResult1 | PromiseLike<TResult1>), onrejected?: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)): PromiseLike<TResult1 | TResult2>;
    throw(e?: unknown): Promise<IteratorResult<Entity, undefined>>;
    values(): AsyncIterableIterator<Entity, any, any>;
}

Type Parameters

  • Entity
  • Params = undefined

Hierarchy

Methods

  • 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.