Files
tekelanew_acs/acs/nladmin-ui/node_modules/xe-utils/orderBy.d.ts

23 lines
680 B
TypeScript
Raw Normal View History

2024-12-03 17:40:13 +08:00
interface OrderBySortConfs<T, C> {
field?: string | ((this: C, item: T, index: number, list: T[]) => any) | null;
order?: 'asc' | 'desc' | null;
}
export type OrderByFieldConfs<T, C> = null | string | any[][] | OrderBySortConfs<T, C> | (string | OrderBySortConfs<T, C>)[] | ((this: C, item: T, index: number, list: T[]) => any);
/**
*
* @param array
* @param fieldConfs
* @param context
*/
export declare function orderBy<T, C = any>(array: T[], fieldConfs: OrderByFieldConfs<T, C>, context?: C): T[];
declare module './ctor' {
interface XEUtilsMethods {
orderBy: typeof orderBy;
}
}
export default orderBy