definitions for knockout.editables 1.1.3 and knockout.viewmodel 0.9

This commit is contained in:
Oisin Grehan
2013-01-10 11:04:03 -05:00
parent 9d34e3867d
commit 12b31edb57
2 changed files with 49 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
/// <reference path="knockout-2.2.d.ts" />
// build: ko.editables 0.9
// http://romanych.github.com/ko.editables/
// bestowed by ko.editable(target)
interface KnockoutEditable {
addEditable(target: any): any;
beginEdit(): void;
commit(): void;
rollback(): void;
hasChanges(): bool;
}
interface KnockoutEditableStatic {
(viewModel: any, autoInit?: bool): void;
beginEdit(scope: string): void;
commit(scope: string): void;
rollback(scope: string): void;
hasChanges(scope: string): bool;
// INTERNAL
//getHasChangesFlag(scope: string): any;
//enable(object: any, scope: string); void;
}
// extend ko global
interface KnockoutStatic {
editable: KnockoutEditableStatic;
}
+19
View File
@@ -0,0 +1,19 @@
/// <reference path="knockout-2.2.d.ts" />
// build: knockout.viewmodel 1.1.3
// http://coderenaissance.github.com/knockout.viewmodel/
interface KnockoutViewModelStatic {
toModel(viewmodel: any): any;
fromModel(model: any, options?: any): any;
updateFromModel(viewmodel: any, model: any);
// INTERNAL flag: enable logging of conversions
// logs will be written to console
logging: bool;
}
// Extend ko global
interface KnockoutStatic {
viewmodel: KnockoutViewModelStatic;
}