Consider the following code:
import * as ko from "knockout";
let obj: ko.Subscribable<number> = ko.observable(5);
let result = obj();
Here, I expect TypeScript to deduce the type for result to be number. However, it deduces the type to be any. This can be attributed to the fact that the base type (SubscribableFunctions<T>) extends Function, which discards the type parameter.
This can be fixed by modifying the Subscribable<T> type declaration to reflect Observable<T>:
export interface Subscribable<T = any> extends SubscribableFunctions<T> {
(): T
}