TS

TypeScript

intermediate

JavaScript that scales.

TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale. It catches errors early in your editor, not later in production. All valid JavaScript is valid TypeScript — migration is gradual.

Web DevelopmentFull-stack ApplicationsLibrariesTooling
0%
0/10 lessons

Setup

TypeScript is installed via npm. For quick experimentation, ts-node lets you run .ts files directly without a compile step.

Bash
# Install Node.js from nodejs.org first
# Then install TypeScript and ts-node:
npm install -g typescript ts-node

# Verify:
tsc --version
ts-node --version

Lessons

1
Hello, TypeScript!
TypeScript is a superset of JavaScript. Every .js file is valid TypeScript — you
2
Basic Types
TypeScript has all JavaScript's types plus a few extras: tuples, enums, `unknown
3
Interfaces & Type Aliases
Interfaces and type aliases both let you name a shape. The difference is subtle
4
Typed Functions
Adding types to functions is where TypeScript pays off most immediately — your e
5
Classes
TypeScript classes add access modifiers (`public`, `private`, `protected`, `read
6
Generics
Generics let you write code that works with many types while staying type-safe.
7
Utility Types
TypeScript ships a library of generic utility types that transform existing type
8
Async TypeScript
TypeScript's async types are straightforward once you know the pattern: async fu
9
Mini Project: Typed CLI Tool
Let's build a typed command-line tool that queries a public API. We'll use gener
10
TypeScript Cheatsheet
The type system on one page — annotations, interfaces, generics, utility types.