UNPKG

typeorm-cursor-paginate

Version:

Cursor-based pagination with directional cursors.

5 lines (4 loc) 509 B
import { ObjectLiteral, ObjectType, SelectQueryBuilder } from "typeorm"; import { CursorPaginatorPaginateParams, CursorPaginatorParams } from "./cursor-paginator"; export type PaginateOptions<TEntity extends ObjectLiteral> = CursorPaginatorPaginateParams & CursorPaginatorParams<TEntity>; export declare function paginate<TEntity extends ObjectLiteral>(entity: ObjectType<TEntity>, qb: SelectQueryBuilder<TEntity>, options: PaginateOptions<TEntity>, isRaw?: boolean): Promise<import(".").Paginated<TEntity>>;