mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-28 12:30:21 +08:00
Knockout mapping observable array functions
Knockout adds mapped versions of remove/destroy and adds "mappedCreate"
This commit is contained in:
1 parent
ec6e0ae952
commit
85388e0177
1 file changed
+14
+14
@@ -43,6 +43,20 @@ interface KnockoutMapping {
|
||||
visitModel(rootObject: any, callback: Function, options?: { visitedObjects?: any; parentName?: string; ignore?: string[]; copy?: string[]; include?: string[]; }): any;
|
||||
}
|
||||
|
||||
interface KnockoutObservableArrayFunctions<T> {
|
||||
mappedCreate(item: T): T;
|
||||
|
||||
mappedRemove(item: T): T[];
|
||||
mappedRemove(removeFunction: (item: T) => boolean): T[];
|
||||
mappedRemoveAll(items: T[]): T[];
|
||||
mappedRemoveAll(): T[];
|
||||
|
||||
mappedDestroy(item: T): void;
|
||||
mappedDestroy(destroyFunction: (item: T) => boolean): void;
|
||||
mappedDestroyAll(items: T[]): void;
|
||||
mappedDestroyAll(): void;
|
||||
}
|
||||
|
||||
interface KnockoutStatic {
|
||||
mapping: KnockoutMapping;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user