- Install the npm package manager if you don't already have it.
- Run
npm install -g typescriptto get the TypeScript Compiler. (You probably need to do this as root.)
-- or --
- Download it from the TypeScript website.
- Execute the intstaller.
Some IDEs (e.g., Visual Studio Code, IntelliJ IDEA, others)
natively support TypeScript-to-JavaScript compilation and have tools for debugging, syntax highlighting, and more.
If your development environment lacks these then you'll have to compile your code from the command line, which is not a bad thing.
(In fact, I kind of like that option.) Just make sure you configure tsconfig.json correctly and test it out.