Installing TypeScript

Download & install Node.js:

Install TypeScript

npm install -g typescript

Compile TypeScript

tsc foo.ts

Output: foo.js

TypeScript in Visual Studio

MSBuild Nuget package

If you add new .ts file to your project, them Visual Studio might ask to install following

Install-Package Microsoft.TypeScript.MSBuild

TypeScript support

On compilation (every time), Visual Studio will create .js file from .ts file (expand Foo.ts => Foo.js)

Visual Studio TypeScript Support

Installing Node.js Workloads

Visual Studio Node.js Workloads

Config file