UNPKG

@simulacrum/github-api-simulator

Version:

Provides common functionality to frontend app and plugins.

29 lines 668 B
export interface PageArgs { first?: number; before?: string; last?: number; after?: string; } export interface PageInfo { hasNextPage: boolean; hasPreviousPage: boolean; startCursor?: string; endCursor?: string; } export interface Page<T> { totalCount: number; edges: { node: T; cursor: string; }[]; nodes: T[]; pageInfo: PageInfo; } export interface RelayPagingOptions { first?: number; after?: string; last?: number; before?: string; } export declare function applyRelayPagination<T, R>(nodes: T[], args: PageArgs, mapper?: (a: T) => R): Page<R>; //# sourceMappingURL=relay.d.ts.map