Home › JavaScript / Node / React › Installing TypeScript for Visual Studio Code
JavaScript / Node / React · Oct 1, 2015 · 1 MIN READ

Installing TypeScript for Visual Studio Code

Visual Studio Code has support for the TypeScript language. To use it, create a new file with TypeScript code in Visual Studio Code:

And save the file, we will see TypeScript as an option:

We can see Visual Studio Code has TypeScript Intellisense:

Visual Studio Code does not include the TypeScript Compiler (tsc). To install it using the Visual Studio Code terminal, type:

npm install -g typescript

You will see TypeScript install:

You can now see which version of TypeScript is installed by entering tsc –version:

Now, create a new file:

Name the file tsconfig.json and add the code:

{
    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "sourceMap": true
    }
}

Now, from the Tasks build menu, select Run Build Task:

And select tsc: build – tsconfig.json:

The terminal will execute the TypeScript compiler tsc:

Which will compile and produce JS files based on the TS files:

You can also simply type the tsc command to transpile the ts file directly.

Carl de Souza
Keep learning. Keep building.

Explore AI, agents & Microsoft technology.

I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.

Subscribe on YouTube →
Carl de Souza Enterprise Architect at Microsoft · AI Technology Expert

One Response to Installing TypeScript for Visual Studio Code

  1. Great article on setting up TypeScript in Visual Studio Code! The step-by-step guide and screenshots make it easy to follow. Installing TypeScript with npm and configuring tsconfig.json is made clear. Thanks for sharing this helpful tutorial!

Leave a Reply

Your email address will not be published. Required fields are marked *

Carl de Souza
KEEP LEARNING. KEEP BUILDING.

Explore AI, agents & Microsoft technology.

I share practical ideas, tutorials, and videos about AI, AI agents, Microsoft technologies, and the Power Platform.