Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Oct 24, 2020
1 parent 7b9513d commit dbf5048
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions methods/array/orderBy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ interface OrderBySortConfs<T, C> {
order?: 'order' | 'desc' | null;
}

export type OrderByFieldConfs = null | string | OrderBySortConfs<T, C> | (string | OrderBySortConfs<T, C>)[] | ((this: C, item: T, index: number, list: T[]) => any);
export type OrderByFieldConfs<T, C> = null | string | 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>(array: T[], fieldConfs: string | OrderBySortConfs<T, C>, context?: C): T[];
export declare function orderBy<T, C>(array: T[], multifield: (string | OrderBySortConfs<T, C>)[], context?: C): T[];
export declare function orderBy<T, C>(array: T[], iterate: ((this: C, item: T, index: number, list: T[]) => any), context?: C): T[];
export declare function orderBy<T, C>(array: T[], fieldConfs: OrderByFieldConfs<T, C>, context?: C): T[];

declare module '../xe-utils' {
interface XEUtilsMethods {
Expand Down

0 comments on commit dbf5048

Please sign in to comment.