TypeScript 5.x: What's New

TypeScript has become the de-facto standard for large-scale JavaScript projects. Here's everything on one card.

Type System Essentials

  • Union & Intersection — A | B, A & B
  • Type Narrowing — typeof, instanceof, discriminated unions
  • Generics with constraints — <T extends object>
  • Mapped Types — { [K in keyof T]: T[K] }
  • Conditional Types — T extends U ? X : Y
  • Template Literal Types — `on${Capitalize<string>}`

Built-in Utility Types

Partial<T>    Required<T>    Readonly<T>
Record<K,V>  Pick<T,K>     Omit<T,K>
Extract<T,U> Exclude<T,U>  ReturnType<T>
Parameters<T> Awaited<T>

TypeScript 5.x Additions

  • const type parameters — infer narrower literal types
  • Variadic tuple improvements — more expressive rest elements
  • satisfies operator — validate types without widening
  • --moduleResolution bundler — aligns with Vite and Next.js 15