TypeScript adds static types to JavaScript for safer, more maintainable code. Browse the topics below to learn step by step or jump to what you need.
Your first TS program with ts-node and tsc.
Primitives (string, number, boolean, bigint, symbol), null/undefined.
let/const, type annotations, inference, and readonly.
const, as const, literal types, and immutability patterns.
if/else, switch, loops, and control-flow narrowing.
Signatures, optional/default/rest params, overloads.
Shape contracts, extension, declaration merging.
Type aliases, unions/intersections, narrowing patterns.
Type parameters, constraints, default params, and inference.
Numeric/string enums, const enums, and alternatives.
Fields, access modifiers, implements/extends, and abstract.
ES modules, import/export, ambient declarations.
typeof/instanceof/in, user-defined guards, and predicates.
Partial, Required, Pick, Omit, Record, ReturnType, etc.
Discriminated unions and exhaustive checks with never.
Typing Promises, async functions, and error handling.
Common DOM typings, Event types, and lib.d.ts overview.
tsconfig, strictness flags, eslint/prettier, project refs.
Jest/Vitest typings, ts-jest/esbuild, and assertions.