forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknockout-transformations.d.ts
More file actions
16 lines (14 loc) · 992 Bytes
/
Copy pathknockout-transformations.d.ts
File metadata and controls
16 lines (14 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Type definitions for knockout-transformations 2.0.0
// Project: https://github.com/One-com/knockout-transformations
// Definitions by: John Reilly <https://github.com/johnnyreilly>, Wim Looman <https://github.com/Nemo157>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts" />
interface KnockoutObservableArrayFunctions<T> {
map<TResult>(mapping: (value: T) => TResult): KnockoutObservableArray<TResult>;
filter(predicate: (value: T) => boolean): KnockoutObservableArray<T>;
sortBy(sorter: (value: T, descending: (sorter: any) => any) => any): KnockoutObservableArray<T>;
indexBy(indexer: (value: T) => string): KnockoutObservable<{ [index: string]: T[] }>;
indexBy(indexer: (value: T) => string[]): KnockoutObservable<{ [index: string]: T[] }>;
indexBy(indexer: (value: T) => any): KnockoutObservable<any>;
uniqueIndexBy(indexer: (value: T) => string): KnockoutObservable<{ [index: string]: T }>;
}