mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Add support for mappingOptions in knockout.projections
Added support for new features introduced in knockout-projections, mappingOptions parameters with either a mapping/disposeItem pair or a single mappingWithDisposeCallback function which produces a mappedItem/dispose pair.
This commit is contained in:
+12
-2
@@ -6,7 +6,17 @@
|
||||
/// <reference path="../knockout/knockout.d.ts" />
|
||||
|
||||
interface KnockoutObservableArrayFunctions<T> {
|
||||
|
||||
map<TResult>(mapping: (value: T) => TResult): KnockoutObservableArray<TResult>;
|
||||
map<TResult>(mappingOptions: {
|
||||
mappingWithDisposeCallback: (value: T) => {
|
||||
mappedValue: TResult;
|
||||
dispose: () => void;
|
||||
};
|
||||
}): KnockoutObservableArray<TResult>;
|
||||
map<TResult>(mappingOptions: {
|
||||
mapping: (value: T) => TResult;
|
||||
disposeItem?: (mappedItem: TResult) => void;
|
||||
}): KnockoutObservableArray<TResult>;
|
||||
map<TResult>(mappingOptions: (value: T) => TResult): KnockoutObservableArray<TResult>;
|
||||
|
||||
filter(predicate: (value: T) => boolean): KnockoutObservableArray<T>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user