mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #13674 from smhc/patch-1
Added option comparator parameter to IFilterOrderBy
This commit is contained in:
Vendored
+13
-2
@@ -660,6 +660,16 @@ declare namespace angular {
|
||||
interface IFilterFilterComparatorFunc<T> {
|
||||
(actual: T, expected: T): boolean;
|
||||
}
|
||||
|
||||
interface IFilterOrderByItem {
|
||||
value: any,
|
||||
type: string,
|
||||
index: any
|
||||
}
|
||||
|
||||
interface IFilterOrderByComparatorFunc {
|
||||
(left: IFilterOrderByItem, right: IFilterOrderByItem): -1 | 0 | 1;
|
||||
}
|
||||
|
||||
interface IFilterCurrency {
|
||||
/**
|
||||
@@ -743,9 +753,10 @@ declare namespace angular {
|
||||
* @param array The array to sort.
|
||||
* @param expression A predicate to be used by the comparator to determine the order of elements.
|
||||
* @param reverse Reverse the order of the array.
|
||||
* @return Reverse the order of the array.
|
||||
* @param comparator Function used to determine the relative order of value pairs.
|
||||
* @return An array containing the items from the specified collection, ordered by a comparator function based on the values computed using the expression predicate.
|
||||
*/
|
||||
<T>(array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean): T[];
|
||||
<T>(array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean, comparator?: IFilterOrderByComparatorFunc): T[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user