mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Fix issue with computeds and KnockoutObservable<infer T>
The fix for #26700 caused this issue, where a KnockoutComputed<T> inferred as KnockoutObservable<T | undefined> when using conditional type inference
This commit is contained in:
Vendored
+1
-4
@@ -140,7 +140,7 @@ interface KnockoutSubscribableStatic {
|
||||
|
||||
interface KnockoutSubscription {
|
||||
/**
|
||||
* Terminates a subscription
|
||||
* Terminates a subscription
|
||||
*/
|
||||
dispose(): void;
|
||||
}
|
||||
@@ -213,9 +213,6 @@ interface KnockoutReadonlyComputed<T> extends KnockoutReadonlyObservable<T> {
|
||||
interface KnockoutComputed<T> extends KnockoutReadonlyComputed<T>, KnockoutObservable<T>, KnockoutComputedFunctions<T> {
|
||||
fn: KnockoutComputedFunctions<any>;
|
||||
|
||||
// It's possible for 'a' to be undefined, since the equalityComparer is run on the initial
|
||||
// computation with undefined as the first argument. This is user-relevant for deferred computeds.
|
||||
equalityComparer(a: T | undefined, b: T): boolean;
|
||||
/**
|
||||
* Manually disposes the computed observable, clearing all subscriptions to dependencies.
|
||||
* This function is useful if you want to stop a computed observable from being updated or want to clean up memory for a
|
||||
|
||||
Reference in New Issue
Block a user