Master TypeScript from scratch with hands-on, interactive tutorials. Learn static types, interfaces, generics, decorators, and advanced type patterns — write and run real TypeScript code in your browser. Free beginner lessons included.
What TypeScript is, why it exists, and how to write your first typed program.
Declaring variables with let, const, and var — and why TypeScript makes variable declarations safer.
Primitive types, arrays, tuples, and special types like any, unknown, and never.
Typed function parameters, return types, overloads, rest parameters, and higher-order functions.
Typed arrays, readonly arrays, tuples, and working with array methods in TypeScript.
Object types, index signatures, structural typing, object spread, and working with Object methods.
Define object shapes with interfaces — the backbone of TypeScript's structural type system.
TypeScript classes with access modifiers, readonly, abstract classes, and interface implementation.
Named constant sets with numeric and string enums, const enums, and when to use them.
Combine types with | (union) and & (intersection), and use type aliases for reusable type definitions.
Write reusable, type-safe functions and data structures with generics.
TypeScript's built-in type transformers: Partial, Required, Readonly, Pick, Omit, Record, and more.
Safely narrow union types at runtime using typeof, instanceof, in, and custom type guards.
Type async functions, Promises, and handle errors in asynchronous TypeScript code.
Organize TypeScript code with ES modules, export patterns, and declaration files.
try/catch with unknown errors, custom error classes, Result types, and building robust error handling patterns.
Mapped types, conditional types, template literal types, and infer keyword.