diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 71252985d7..57d4d4bf11 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -64,8 +64,8 @@ interface KnockoutComputedStatic { (): KnockoutComputed; (func: () => T, context?: any, options?: any): KnockoutComputed; - (def: KnockoutComputedDefine): KnockoutComputed; - (options?: any): KnockoutComputed; + (def: KnockoutComputedDefine, context?: any): KnockoutComputed; + (options?: any, context?: any): KnockoutComputed; } interface KnockoutComputed extends KnockoutObservable, KnockoutComputedFunctions { @@ -397,7 +397,11 @@ interface KnockoutStatic { subscribable: KnockoutSubscribableStatic; observable: KnockoutObservableStatic; - computed: KnockoutComputedStatic; + + computed: KnockoutComputedStatic; + pureComputed(evaluatorFunction: () => T, context?: any): KnockoutComputed; + pureComputed(options: KnockoutComputedDefine, context?: any): KnockoutComputed; + observableArray: KnockoutObservableArrayStatic; contextFor(node: any): any; @@ -412,7 +416,9 @@ interface KnockoutStatic { cleanNode(node: Element): Element; renderTemplate(template: Function, viewModel: any, options?: any, target?: any, renderMode?: any): any; renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any; - unwrap(value: any): any; + unwrap(value: any): any; + + computedContext: KnockoutComputedContext; ////////////////////////////////// // templateSources.js @@ -513,6 +519,12 @@ interface KnockoutStatic { }; } +interface KnockoutComputedContext { + getDependenciesCount(): number; + isInitial: boolean; + isSleeping: boolean; +} + declare module "knockout" { export = ko; }