Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 587 Bytes

readme.md

File metadata and controls

36 lines (23 loc) · 587 Bytes

Getting Started with Typescript

Prerequisites

  • node
  • npm

Installation

Install typescript globally

npm install --location=global typescript

Configuration - tsconfig.json

tsc --init

outDir, include, target, noImplicitlyAny, noEmitOnError

Run

First compile typescript files using tsc compiler e.g. for file called index.ts you need to do:

tsc index.ts

To run each files, use node to run your js files inside the outDir folder (where you have configured to output the compiled javascript file)

node dist/index.js