Visual Studio has a Typescript addon for developing apps with the Typescript language.
And there is also the Node.js Tools for VS, with which one is able to create and debug Node.js applications.
And if I create a simple Typescript project, then it does not start my app with Node, because it is basically just an ASP.Net web project.
Is it possible to somehow create a VS project that uses Typescript and Node.js integration at the same time?
Here is Solutions:
We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.
Yes, it is possible, but in a somewhat awkward way (I hope Node.js Tools will support this better in the future).
You should create Node.js project and add a new file. Choose new text file and enter its name with .ts extension. It will create a typescript file.
To fix this go to VS “Tools” menu, open “Options” and go to “Text editor” > “TypeScript” > “Project” and under “Compile on Save” check “Automatically compile TypeScript files which are not part of a project and choose “Use commonjs…”.
Downside of this solution is that you have to remember to save manually each .ts you edit, but I think its not a big deal.
Here’s a link to the post that helped me with the same problem: http://blog.ctaggart.com/2013/11/nodejs-tools-with-typescript-console-app.html
If you grab the latest dev build of Node.js Tools you will see that TypeScript support is added. you can create TypeScript project (and this includes debugging .ts files feature)
Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂