From 1b04524e2eb4e7eafde5d46595edc8509e76daae Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 16 Oct 2014 11:27:05 +0100 Subject: [PATCH 1/2] Knockout: Remove invalid overload --- knockout/knockout.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 8fc87e98d4..d67e96a186 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -65,7 +65,6 @@ interface KnockoutComputedStatic { (): KnockoutComputed; (func: () => T, context?: any, options?: any): KnockoutComputed; (def: KnockoutComputedDefine, context?: any): KnockoutComputed; - (options?: any, context?: any): KnockoutComputed; } interface KnockoutComputed extends KnockoutObservable, KnockoutComputedFunctions { From 94f56889077472cc2fbc637c00e17277a24292f7 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Thu, 16 Oct 2014 11:37:53 +0100 Subject: [PATCH 2/2] Knockout: Fixed tests --- knockout/tests/knockout-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/knockout/tests/knockout-tests.ts b/knockout/tests/knockout-tests.ts index 82b5aa25c0..2b9253d5c5 100644 --- a/knockout/tests/knockout-tests.ts +++ b/knockout/tests/knockout-tests.ts @@ -72,7 +72,7 @@ function test_computed() { this.acceptedNumericValue = ko.observable(123); this.lastInputWasValid = ko.observable(true); - this.attemptedValue = ko.computed({ + this.attemptedValue = ko.computed({ read: this.acceptedNumericValue, write: function (value) { if (isNaN(value)) @@ -284,7 +284,7 @@ function test_more() { }; ko.extenders.numeric = function (target, precision) { - var result = ko.computed({ + var result = ko.computed({ read: target, write: function (newValue) { var current = target(),