mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 22:40:03 +08:00
Corrected interface for IFilterOrderByComparatorFunc
Fixed return value and parameter types.
This commit is contained in:
16
angular/index.d.ts
vendored
16
angular/index.d.ts
vendored
@@ -661,10 +661,16 @@ declare namespace angular {
|
||||
(actual: T, expected: T): boolean;
|
||||
}
|
||||
|
||||
interface IFilterOrderByComparatorFunc<T> {
|
||||
(left: T, right: T): boolean;
|
||||
interface IFilterOrderByItem {
|
||||
value: any,
|
||||
type: string,
|
||||
index: any
|
||||
}
|
||||
|
||||
|
||||
interface IFilterOrderByComparatorFunc {
|
||||
(left: IFilterOrderByItem, right: IFilterOrderByItem): [-1, 0, 1];
|
||||
}
|
||||
|
||||
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.
|
||||
@@ -748,9 +754,9 @@ declare namespace angular {
|
||||
* @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.
|
||||
* @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, comparator?: IFilterOrderByComparatorFunc<T>): 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