Value of type “JqueryStatic” is not callable

前端 未结 1 2065
别跟我提以往
别跟我提以往 2021-02-20 15:54

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 re

1条回答
  •  死守一世寂寞
    2021-02-20 16:30

    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
    

    0 讨论(0)
提交回复
热议问题