javascript - Visual Studio Compile Problems with Definitely Typed Typescript - Stack Overflow

I have a Visual Studio project with typescript files in it and I want to get intellisense working for t

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
Add a ment  | 

2 Answers 2

Reset to default 8

The 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744275092a4566289.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信