forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
knockout.projections.d.ts
25 lines (21 loc) · 1 KB
/
knockout.projections.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Type definitions for knockout-projections 1.0.0
// Project: https://github.com/stevesanderson/knockout-projections
// Definitions by: John Reilly <https://github.com/johnnyreilly>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts" />
interface KnockoutMappedObservableArray<T> extends KnockoutObservableArray<T>, KnockoutSubscription {
}
interface KnockoutObservableArrayFunctions<T> {
map<TResult>(mappingOptions: {
mappingWithDisposeCallback: (value: T) => {
mappedValue: TResult;
dispose: () => void;
};
}): KnockoutMappedObservableArray<TResult>;
map<TResult>(mappingOptions: {
mapping: (value: T) => TResult;
disposeItem?: (mappedItem: TResult) => void;
}): KnockoutMappedObservableArray<TResult>;
map<TResult>(mappingOptions: (value: T) => TResult): KnockoutMappedObservableArray<TResult>;
filter(predicate: (value: T) => boolean): KnockoutMappedObservableArray<T>;
}