anitimejs
Version:
Thư viện xử lý chuỗi số và thời gian trong JavaScript/Typescript
15 lines (14 loc) • 398 B
TypeScript
type SortOrder = "asc" | "desc";
interface SortOptions<T = any> {
key?: string;
order?: SortOrder;
deepKeys?: {
deepKey: string;
sortKey?: string;
order?: SortOrder;
}[];
customCompare?: (a: any, b: any) => number;
nullsPosition?: 'first' | 'last';
}
export declare const sortArray: <T = any>(array: T[], options?: SortOptions<T>) => T[];
export {};