Change8

Migrating to TypeScript v5.8-beta

Version v5.8-beta introduces 2 breaking changes. This guide details how to update your code.

Released: 1/29/2025

2
Breaking Changes
2
Migration Steps
5
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

--erasableSyntaxOnly--module--moduleResolutionnodenextnode18

Breaking Changes

Issue #1

The --module nodenext flag now enforces that 'use external' and other non-standard module behaviors are restricted to ensure compatibility with Node.js's native ESM implementation.

Issue #2

Stricter checks on 'module' and 'moduleResolution' settings to prevent invalid configurations when targeting modern runtimes.

Migration Steps

  1. 1
    If using --erasableSyntaxOnly, ensure that enums and namespaces are refactored if they are intended to be stripped by simple transpilers.
  2. 2
    Review module resolution settings if upgrading from a version prior to 5.0.

Release Summary

TypeScript 5.8 Beta introduces the --erasableSyntaxOnly flag for better compatibility with non-TS transpilers and refines module resolution for Node.js environments.

Need More Details?

View the full release notes and all changes for TypeScript v5.8-beta.

View Full Changelog