admin管理员组文章数量:1401636
I have a Visual Studio project with typescript files in it and I want to get intellisense working for typescript. I have installed the nuget packages for jQuery, knockout, underscore, and a couple other projects but currently I am unable to get the intellisense from these projects. I have numerous pile errors on all the definitely typed packages, is there something wrong with this project or is there something special I need to do to install them?
Thanks!
I have a Visual Studio project with typescript files in it and I want to get intellisense working for typescript. I have installed the nuget packages for jQuery, knockout, underscore, and a couple other projects but currently I am unable to get the intellisense from these projects. I have numerous pile errors on all the definitely typed packages, is there something wrong with this project or is there something special I need to do to install them?
Thanks!
Share Improve this question asked Jul 26, 2013 at 19:16 nobodynobody 8,29913 gold badges62 silver badges98 bronze badges 4- What are the pile errors you are getting on the TypeScript definition files? And you've added the /// <reference to the files you want to use them in? – Steve Michelotti Commented Jul 26, 2013 at 20:25
- 1 yup. the errors i get are things like: 'the name boolean doesn't exist in the current scope' in knockout.d.ts or 'Expected ;' in knockout.d.ts. In jquery.d.ts I get the same boolean problem. I am guessing the definitely typed files were created with an older version of typescript and weren't updated to use the bool keyword? – nobody Commented Jul 26, 2013 at 20:38
- 1 It's been updated to "boolean" in the latest TypeScript. Are you sure the definition files aren't newer than your version of TypeScript? – NickL Commented Jul 26, 2013 at 21:02
- Oh that must be it! My build server though only supports version .8 right now though, is there a patible definitely typed file? – nobody Commented Jul 26, 2013 at 21:43
2 Answers
Reset to default 8The type bool was renamed to boolean in TypeScript 0.9 - the Definitely Typed declaration has been updated for this change.
If you look at the version history in the GitHub repository, you should be able to grab the older version to work with 0.8.
For example you'll want the June 21st version of jQuery.d.ts as this is before it was updated for 0.9
If you use nuget. use the -pre switch on install-package. but uninstall the typing first.
PM> Uninstall-Package jquery.TypeScript.DefinitelyTyped
PM> install-Package jquery.TypeScript.DefinitelyTyped -Pre
this has fixes
本文标签: javascriptVisual Studio Compile Problems with Definitely Typed TypescriptStack Overflow
版权声明:本文标题:javascript - Visual Studio Compile Problems with Definitely Typed Typescript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744275092a2598371.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论