I'm trying to convert a pet project to TypeScript and don't seem to be able to use the
Technically speaking you have a few options here:
If you are using an IDE like Sublime Text and integrated MSN plugin for Typescript: http://blogs.msdn.com/b/interoperability/archive/2012/10/01/sublime-text-vi-emacs-typescript-enabled.aspx you can create a build system which compile the
.ts source to
.js automatically. Here is the explanation how you can do it: How to configure a Sublime Build System for TypeScript.
You can define even to compile the source code to destination
.js file on file save. There is a sublime package hosted on github: https://github.com/alexnj/SublimeOnSaveBuild which make this happen, only you need to include the
ts extension in the
Another possibility would be to compile each file in the command line. You can compile even multiple files at once by separating them with spaces like so:
tsc foo.ts bar.ts. Check this thread: How can I pass multiple source files to the TypeScript compiler?, but i think the first option is more handy.