/ts-js-for-developers

algorithms and data structure in JavaScript - TypeScript

Primary LanguageTypeScriptMIT LicenseMIT

ts-js-for-developers

algorithms and data structure in JavaScript - TypeScript

Installation

npm install -g typescript

TypeScript

After installing typescript, create a .ts file, for example, tsJsLove.ts as given below:

let message: string = 'I love JavaScript and TypeScript'; 
console.log(message); 
// save the file as tsJsLove.ts 

Usage

tsc tsJsLove.ts --target 'es2017' --outDir 'js' && node js/tsJsLove.js
Output should be I love JavaScript and TypeScript