forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
knockout.deferred.updates.d.ts
46 lines (38 loc) · 1.32 KB
/
knockout.deferred.updates.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Type definitions for Knockout Deferred Updates
// Project: https://github.com/mbest/knockout-deferred-updates
// Definitions by: Sebastián Galiano <https://github.com/sgaliano/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts" />
interface KnockoutDeferredTasks {
processImmediate(evaluator: Function, object?: any, args?: any[]): any;
processDelayed(evaluator: Function, distinct?: boolean, options?: any[]): boolean;
makeProcessedCallback(evaluator: Function): void;
}
// Knockout global
interface KnockoutStatic {
tasks: KnockoutDeferredTasks;
processAllDeferredBindingUpdates(): void;
processAllDeferredUpdates(): void;
evaluateAsynchronously(evaluator: Function, timeout?: any): number;
ignoreDependencies(callback: Function, callbackTarget: any, callbackArgs?: any[]);
}
// Observables
interface KnockoutSubscribableFunctions<T> {
deferUpdates: boolean;
}
// Computed
interface KnockoutComputedStatic {
deferUpdates: boolean;
}
interface KnockoutSubscription {
deferUpdates: boolean;
}
// Utils
interface KnockoutUtils {
objectForEach(obj: any, action: Function): void;
objectMap(source: any, mapping: Function): any;
}
// Deferred extender
interface KnockoutExtenders {
deferred(target: any, value: boolean): any;
}