Anno
Anno

Reputation: 861

error TS2339: Property 'name' does not exist on type 'KnockoutExtenders'

I try to use knockout in TypeScript and I think I have the same problem as here but I can't find the typings that I need to install. The code line is:

ko.extenders.name = function (target : string) {

and error is:

error TS2339: Property 'name' does not exist on type 'KnockoutExtenders'.

How can I fix this?

Further errors of the same type in my code are:

error TS2339: Property 'number' does not exist on type 'KnockoutExtenders'.

and

error TS2339: Property 'modal' does not exist on type 'JQuery<HTMLElement>'.

for code

$('#signup-dialog').modal('show');

Upvotes: 0

Views: 771

Answers (1)

Anno
Anno

Reputation: 861

Looks like the .modal() came from Bootstrap. So I had to install bootstrap typings via npm install --save-dev @types/bootstrap.

Upvotes: 0

Related Questions