Mělo by fungovat tohle:
class ViewModel {
firstName: any;
lastName: any;
fullString: any;
constructor(first: string, last: string) {
this.firstName = ko.observable(first);
this.lastName = ko.observable(last);
this.fullName = ko.pureComputed(() => `${this.firstName()} ${this.lastName()}`, this);
};
}
A doporučoval bych, aby sis z Githubu stáhnul typové definice pro Knockout a používal je místo "any".