mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Merge pull request #5814 from use-strict/angularjs-filter-service
angularjs - better granularity for filter service parameter types
This commit is contained in:
18
angularjs/angular.d.ts
vendored
18
angularjs/angular.d.ts
vendored
@@ -782,7 +782,23 @@ declare module angular {
|
||||
*
|
||||
* @param name Name of the filter function to retrieve
|
||||
*/
|
||||
(name: string): Function;
|
||||
(name: string): IFilterFunc;
|
||||
}
|
||||
|
||||
interface IFilterFunc {
|
||||
<T>(array: T[], expression: string | IFilterPatternObject | IFilterPredicateFunc<T>, comparator?: IFilterComparatorFunc<T>|boolean): T[];
|
||||
}
|
||||
|
||||
interface IFilterPatternObject {
|
||||
[name: string]: string;
|
||||
}
|
||||
|
||||
interface IFilterPredicateFunc<T> {
|
||||
(value: T, index: number, array: T[]): T[];
|
||||
}
|
||||
|
||||
interface IFilterComparatorFunc<T> {
|
||||
(actual: T, expected: T): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user