-
Install TypeScript globally:
npm install -g typescript
-
Install TS Node globally:
npm install -g ts-node
-
Install TypeScript locally:
npm install -D typescript
-
Install TS Node locally:
npm install -D ts-node
-
Install FlatMap:
npm i array.prototype.flatmap
andnpm install --save array.prototype.flatmap
-
Install from:
npm i array.from
-
Install range:
npm i array-range
and import:var range = require('array-range')
-
Install Collections:
npm install --save collections
-
Install streams:
npm install --save sequency
and import:const Stream = require('stream')
-
String operations:
npm i typescript-string-operations
-
logger:
npm i js-logger
-
streams:
npm i ts-stream
and thennpm install --save ts-stream
-
Typescript EVAL:
npm i ts-node
-
Immutable data structure:
npm install immutable
ornpm install mori
tsc -v
-
First run typescript:
tsc filename.ts
-
Then run using node:
node filename.js
-
Run typescript and node:
tsc filename.ts | node filename.js
-
Run using ts-node:
ts-node filename.ts
- mac:
Shift + Option + F
- windows:
Shift + Alt + F