Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Course Overview & Environment Se | TypeScript Mastery lesson | BraveProgrammer
  1. Courses
  2. /
  3. TypeScript Mastery

Lesson 1 of 56

·Typescript

Course Overview & Environment Setup

15 minutes

Course progress2%

Welcome to TypeScript!

In this first lesson we’ll install Node.js (v20+), npm, and the TypeScript compiler (tsc).

Install Node.js

# macOS / Linux (using Homebrew)
brew install node
# Windows (via Chocolatey)
choco install nodejs

Install TypeScript globally

npm install -g typescript

Verify installation

$ node -v
$ npm -v
$ tsc -v   # should print something like 5.2.x

Create a new project folder and initialize npm:

mkdir ts‑mastery && cd $_
npm init -y

Now add a tsconfig.json – this file tells the compiler how to emit JavaScript:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "strict": true,
    "outDir": "dist",
    "rootDir": "src",
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

Create a src folder with a simple index.ts:

// src/index.ts
console.log('👋 Hello, TypeScript!');

Compile and run:

npx tsc   # compiles to ./dist/index.js
node dist/index.js

Tip: Use npx ts-node src/index.ts for rapid prototyping without a build step.

Info

All subsequent lessons assume this project structure.
Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from TypeScript MasteryBrowse activities
Continue to lesson 2The TypeScript Compiler & tsconfig.json