Merge pull request #2987 from johnnyreilly/master

Knockout: Remove invalid overload
This commit is contained in:
John Reilly
2014-10-16 11:39:31 +01:00
2 changed files with 2 additions and 3 deletions

View File

@@ -65,7 +65,6 @@ interface KnockoutComputedStatic {
<T>(): KnockoutComputed<T>;
<T>(func: () => T, context?: any, options?: any): KnockoutComputed<T>;
<T>(def: KnockoutComputedDefine<T>, context?: any): KnockoutComputed<T>;
(options?: any, context?: any): KnockoutComputed<any>;
}
interface KnockoutComputed<T> extends KnockoutObservable<T>, KnockoutComputedFunctions<T> {

View File

@@ -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<number>({
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<any>({
read: target,
write: function (newValue) {
var current = target(),