TypeScript vs JavaScript Explained
TypeScript is JavaScript plus static types. Compare the two languages across type checking, error detection, tooling, and real-world development.
Type-safe JavaScript with TypeScript
TypeScript is JavaScript plus static types. Compare the two languages across type checking, error detection, tooling, and real-world development.
TypeScript catches bugs at compile time that JavaScript only finds at runtime. See real examples of the most common errors TypeScript prevents.
Learn the three ways to run TypeScript from the terminal: compile with tsc and run with Node.js, run directly with tsx, or use ts-node for one-shot execution.
The TypeScript compiler (tsc) turns .ts files into .js files while checking types. Learn what it does, how to use it, and how it fits your workflow.
A tsconfig.json file tells TypeScript how to compile your project. Learn how to create one, what the key sections mean, and which options to set first.
Learn to type what a promise resolves to in TypeScript. Covers explicit Promise<T> annotations, inference from async functions, ReturnType, and Awaited for extracting resolved types.
TypeScript types disappear at runtime. Learn how to validate data as it enters your application using type guards, assertion functions, and validation libraries to bridge the gap between compile-time types and runtime reality.
TypeScript types disappear at runtime, and the most common mistakes happen when developers forget this. Learn the pitfalls of typeof, instanceof, type assertions, and structural checking so you stop trusting types at runtime.
Pick creates a new type by selecting only the properties you name from an existing type. Use it to build focused types for specific views, API responses, or function parameters.
Parameters<T> extracts the parameter types of a function as a tuple. Use it to reuse parameter types without duplicating them.
Template literal types construct new string literal types at the type level, just like template literals build strings at runtime. Use them for string pattern matching and type-safe APIs.
Install and configure ESLint with typescript-eslint to catch bugs and enforce consistent code style in your TypeScript project.