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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744275092a4566289.html
评论列表(0条)