TypeScript

Intro :

-Created by Microsoft
-Code will be transpiled in JavaScript
-Strongly typed

Doc :

Tuto :

Setup :

npm install -g typescript

Check version

tsc -v

Transpile :

**ES3 (by default)

tsc filename.ts

**ES5

tsc filename.ts --target es5

Hot reload :

tsc -w --pretty filename.ts --target es5

Configuration file :

Create tsconfig.json at project’s root.

{
    "compilerOptions": {
        "target": "ES5",
        "pretty": true,
        "outDir": "./build"
    },
    "files": [
        "demo.ts",
        "class.ts"
    ],
    "exclude": ["node_modules"]
}

Launch transpiler :

tsc -w