mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
TypeScript 0.9.5 beta does not allow generic type references without the type argument. This code will still compile for 0.9.1 users. Flight and Ember have further compile problems in 0.9.5 that I don't feel qualified to address as I'm not versed in those libraries.
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
// 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 {
|
|
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;
|
|
} |