@aequum/paginate-common
Version:
aequum pagination common components
11 lines (10 loc) • 343 B
TypeScript
/**
* Sort object, like the MongoDB database sort object, must have the field name
* as key and for value you should use `'asc'`, `'desc'`, `1` for ascendant and
* `-1` for descendant.
*
* For MongoDB, you could use dot notation for nested document fields
*/
export type PaginateSortBy = {
[key: string]: 'asc' | 'desc' | 1 | -1;
};