4/29/2018 - 3:46 AM

Typescript setup in VSCode

Typescript setup in VSCode

    "compilerOptions": {
        "target": "es5",
        "module": "commonjs",
        "sourceMap": true
    "exclude": [
class Startup {
    public static main(): number {
        console.log('Hello World');
        return 0;


Jay's Typescript Setup Notes

In Terminal

Add typescript globally to to my computer

npm install -g typescript

Check to make sure it worked

tsc --version
tsc --help

Setup a simple example

First create a simple config file to build from the typescript files

  • see attached tsconfig.json

Create helloworld file in typescript

  • see attached helloworld.ts

Build in VSCode with tsconfig.json

  • see that it produced a helloworld.js file
  • see that it produced a file

Run in terminal to make sure it spits out 'Hello World'

type this in

node helloworld.js