From a67d9c1d527277e30d46a5ef51dc686664a24622 Mon Sep 17 00:00:00 2001 From: smhc Date: Mon, 2 Jan 2017 17:14:53 +1000 Subject: [PATCH] Added comparator to IFilterOrderBy --- angular/index.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/angular/index.d.ts b/angular/index.d.ts index 920b616a26..6d72ae6fef 100644 --- a/angular/index.d.ts +++ b/angular/index.d.ts @@ -660,7 +660,11 @@ declare namespace angular { interface IFilterFilterComparatorFunc { (actual: T, expected: T): boolean; } - + + interface IFilterOrderByComparatorFunc { + (left: T, right: T): boolean; + } + interface IFilterCurrency { /** * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used. @@ -743,9 +747,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. + * @param comparator Function used to determine the relative order of value pairs. * @return Reverse the order of the array. */ - (array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean): T[]; + (array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean, comparator?: IFilterOrderByComparatorFunc): T[]; } /**