forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ko.editables.d.ts
32 lines (27 loc) · 910 Bytes
/
ko.editables.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
26
27
28
29
30
31
32
// Type definitions for knockout-editables 0.9
// Project: http://romanych.github.com/ko.editables/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts" />
// bestowed by ko.editable(target)
interface KnockoutEditable {
addEditable(target: any): any;
beginEdit(): void;
commit(): void;
rollback(): void;
hasChanges(): boolean;
}
interface KnockoutEditableStatic {
(viewModel: any, autoInit?: boolean): void;
beginEdit(scope: string): void;
commit(scope: string): void;
rollback(scope: string): void;
hasChanges(scope: string): boolean;
// INTERNAL
//getHasChangesFlag(scope: string): any;
//enable(object: any, scope: string); void;
}
// extend ko global
interface KnockoutStatic {
editable: KnockoutEditableStatic;
}