What's New

When you follow an older tutorial or upgrade a project, check which release introduced a feature:

TypeScript releases from 5.0 to 7.0 (source: official release announcements)
Version Released Highlights
5.0 Mar 2023 Standard decorators, const type parameters, bundler mode
5.1 Jun 2023 Unrelated getter and setter types
5.2 Aug 2023 using declarations, decorator metadata
5.3 Nov 2023 Import attributes, switch (true) narrowing
5.4 Mar 2024 NoInfer<T>, narrowing preserved in closures
5.5 Jun 2024 Inferred type predicates, isolatedDeclarations
5.6 Sep 2024 Errors on always-truthy checks, iterator helpers
5.7 Nov 2024 Never-initialized variable checks
5.8 Feb 2025 erasableSyntaxOnly, require() of ESM in nodenext
5.9 Aug 2025 import defer, minimal tsc --init
6.0 Mar 2026 Last JavaScript-based release; new defaults
7.0 Jul 2026 Native Go compiler (TypeScript 6 and 7)

Three of these features in one file, checked by tsc 7.0 and run by Node.js 25 2,131 :

using (5.2), NoInfer (5.4) and inferred type predicates (5.5)JavaScript
function openLog(name: string) {
  console.log(`open ${name}`);
  return { [Symbol.dispose]: () => console.log(`close ${name}`) };
}
const pick = <T extends string>(options: T[], fallback: NoInfer<T>): T => options[0] ?? fallback;
{
  using log = openLog("audit");                                 // disposed at block end
  const ids = [3, undefined, 7].filter((id) => id !== undefined); // number[]
  console.log(ids.map((id) => id * 2), pick(["sm", "lg"], "sm"));
  pick(["sm", "lg"], "xl");
}
Output
$ npx tsc --noEmit
whatsnew.ts(10,22): error TS2345: Argument of type '"xl"' is not assignable to parameter of
  type '"lg" | "sm"'.
$ node whatsnew.ts
open audit
[ 6, 14 ] sm
close audit

Without NoInfer, T widens to include "xl" and the typo passes. TypeScript 5.4 also reports 'id' is possibly 'undefined': before 5.5 you had to write (id): id is number => ... yourself.