UNPKG

reablocks

Version:
20 lines (19 loc) 591 B
export type SortDirection = 'asc' | 'desc' | null; export interface SortValue { /** * The field to sort by. */ field: string; /** * The direction to sort by. */ direction: SortDirection; } /** * @param direction Current sort direction * * @param defaultDirection Inital sort direction in case currently unsorted * * @param canBeNull If next direction can be null (unsorted) */ export declare function getNextDirection(direction?: SortDirection | null, defaultDirection?: NonNullable<SortDirection>, canBeNull?: boolean): NonNullable<SortDirection>;