类型为"JqueryStatic"的值;不可通话 [英] Value of type "JqueryStatic" is not callable

查看:68
本文介绍了类型为"JqueryStatic"的值;不可通话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个打字稿项目.当我调用"$"时,编辑器说类型为'JqueryStatic'的值不可调用.".我安装了jquery.definetelyTyped软件包,还引用了jquery.d.ts文件.

解决方案

Resharper 9.0不支持刚刚出现在TypeScript中,并且在最近几个发行版的jquery.d.ts中出现的新的联合类型. /p>

Resharper 9.1 支持Typescript联合,因此可以解决此问题.

如果无法更新,请在nuget控制台中执行此操作:

uninstall-package jquery.TypeScript.DefinitelyTyped -force
install-package jquery.TypeScript.DefinitelyTyped -version 2.1.4

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.

解决方案

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

这篇关于类型为"JqueryStatic"的值;不可通话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆