UNPKG

declarative-js

Version:

_declarative-js_ is modern JavaScript library, that helps to: - tackle array transformation with built in JavaScript array api (e.g. `array.filter(toBe.unique())`), - provide a type-level solution for representing optional values instead of null referen

20 lines (19 loc) 700 B
import { Sort } from '../array/sort'; import { Getter } from '../types'; /** * @ignore * @internal */ export declare function sortByConditions<T, R>(...conditions: Sort.SortingCondition<T, R>[]): (a: T, b: T) => 0 | 1 | -1; /** * @ignore */ export declare function sortByPropertyAndPriority<T, K extends keyof T>(key: K, values: T[K][]): (a: T, b: T) => 0 | 1 | -1; /** * @ignore */ export declare function sortByGetters(numbers: Sort.IfAHigherB): <T>(...mappersArr: Getter<T, string | number>[]) => (a: T, b: T) => number; /** * @ignore */ export declare function sortByKeyValues(numbers: Sort.IfAHigherB): <T, K extends keyof T>(...keys: K[]) => (a: T, b: T) => number;