To install *TypeScript**, you'll need **Node.js* installed first. Here's how to install TypeScript step by step:
---
✅ *Step 1: Install Node.js*
Download and install it from the official website:
🔗 [https://nodejs.org](https://nodejs.org)
Installing Node.js will also install `npm` (Node Package Manager), which you need to install TypeScript.
---
✅ *Step 2: Install TypeScript globally*
Open your terminal or command prompt and run:
```bash
npm install -g typescript
```
This installs the TypeScript compiler globally so you can use the `tsc` command from anywhere.
---
✅ *Step 3: Verify the installation*
To check if TypeScript is installed correctly, run:
```bash
tsc --version
```
You should see the installed version (e.g., `Version 5.x.x`).
---
Optional: Install TypeScript locally (for a specific project)
Navigate to your project folder and run:
```bash
npm init -y
npm install --save-dev typescript
```
This installs TypeScript as a dev dependency for the project and adds it to your `package.json`.
---
Would you like help setting up a TypeScript project or compiling `.ts` files?