Thuta Learning
BasicProgrammingintermediate

Get Started (Setup)

Relax. We'll talk through this in plain words — no textbook voice.

To get started with TypeScript, you'll need Node.js and npm installed on your computer.

Local Setup Steps:

1. Open your terminal (Command Prompt) and install the TypeScript Compiler (tsc):

npm install -g typescript

2. Create a new file named app.ts and write your TypeScript code in it.

3. In the terminal, tsc app.ts to compile it, which generates a new app.js file.

4. node app.js to run the resulting JavaScript file.

typescript
# 1. Install TypeScript globally
npm install -g typescript

# 2. Create a file named app.ts
# 3. Compile the TypeScript file
tsc app.ts

# 4. Run the resulting JavaScript file
node app.js
You should see
(On the official TypeScript Playground, you can try it out directly without any of these setup steps.)