Should you be able to load these files into Visual Studio, you would get the same type of IntelliSense that you are used to with C#. True, this IntelliSense will only be for the definition files you include, but at the end of the day, that is still a HUGE win. And if you are working on big legacy projects, you can benefit from these type definitions without any changes to your code base.
So it's a gain without a pain.
Loading the AngularJS TypeScript definition file in VS2015
You'll be amazed by how easy this is.
Install VS TypeScript tools
First of all you'll need to install the VS TypeScript tools. I'm not entirely sure this step is absolutely necessary, but let's dot it all the same. Go to 'Tools' > 'Extenstions and Updates' and type in 'typescript' in the search box. Install the first one you find, which is at time of writing 'TypeScript 1.8.4 for Visual Studio 2015'.
Install the AngularJS TypeScript Nuget package
We'll take AngularJS as an example.
No IntelliSense what-so-ever. You could learn the complete AngularJS API by heart and work like that, or you could make it yourself a whole lot easier.
Start by installing the Nuget package displayed below in your web project (if you search for 'typescript'):
Installing this Nuget will add the necessary .d.ts files in your web project. You'll find them in the 'Scripts/typings' folder.
Visual Studio will automatically pick these files up and provide IntelliSense if possible. So our previous example now looks like this:
And that's what you get, just by installing a Nuget package! I was really amazed by how easy this is :). You can find almost every corresponding TypeScript definition file you need, right there on Nuget.
Happy Coding !
Leave us your opinion.