Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value of type "JqueryStatic" is not callable

I am developing a typescript project. When I call "$" editor says "Value of type 'JqueryStatic' is not callable.". I installed jquery.definetelyTyped package and I also referenced jquery.d.ts file.

Image

like image 964
arnes Avatar asked Jan 26 '15 10:01

arnes


1 Answers

Resharper 9.0 does not support the new union types which have just arrived in TypeScript, and which have appeared in jquery.d.ts in the last few releases.

Resharper 9.1 supports Typescript unions, so it fixes this.

If you can't update, do this in your nuget console:

uninstall-package jquery.TypeScript.DefinitelyTyped -force
install-package jquery.TypeScript.DefinitelyTyped -version 2.1.4
like image 86
Will Dean Avatar answered Nov 10 '22 09:11

Will Dean