export enum SortOrdersEnum { ASC = 'asc' , DESC = 'desc' } export interface SortOptions < T > { by ? : T ; order ? : SortOrdersEnum ; } internal export function sortBy < T > ( defaultSortBy , options ? ) { const { by = defaultSortBy , order = SortOrdersEnum . ASC } = options || { } ; return { sort : by , sort_order : order , } ; }