Files
DefinitelyTyped/knockout.deferred.updates/knockout.deferred.updates.d.ts
Jeffery Grajkowski 798dbfbf8f Converting ungeneric "Array" to "any[]"
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.
2013-11-26 10:29:46 -08:00

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;
}