mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Merge pull request #2987 from johnnyreilly/master
Knockout: Remove invalid overload
This commit is contained in:
1
knockout/knockout.d.ts
vendored
1
knockout/knockout.d.ts
vendored
@@ -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> {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user