Create a "Hello World" project in TypeScript using WebStorm IDE from JetBrains.
1 Install npm: Node Package Manager: Manejador de paquetes
$ sudo apt install npm
2 Create a project
- IDE: WebStorm
File >New>Project>Empty: hello_world_ts
3 Open terminal and go to project root
$ cd ~/hello_world_ts
4 Configure npm to create package.json
$ npm init
Fill information
5 Install TypeScript with npm
$ npm install typescript --save-dev
6 Add plugin ignore (optional)
Settings > Plugins > Marketplace: ignore (restart requeried)
7 Install ts-node to run typescript as tests inside WebStorm
$ npm install ts-node --save-dev
8 Install test suite "mocha"
$ npm install mocha --save-dev
9 Add types mocha and node
$ npm install @types/mocha --save-dev
$ npm install @types/node --save-dev
$ cd source
$ tsc
$ cd ..
$ tsc --watch
- Open source/index.ts file
- In the bottom toolbar shoud appear "TypeScript 3.x.x" window
- In TypeScript window click the hammer>Compile All
- Right click tsconfig.json file
- Click "Compile Typescript"
- Right click tests/index.ts
- Run 'index.ts'