TypeScript 6.0 RC
6 hours ago
- #JavaScript
- #Programming
- #TypeScript
- TypeScript 6.0 Release Candidate (RC) is now available for installation via npm.
- TypeScript 6.0 is the last release based on the current JavaScript codebase, with future versions (starting from 7.0) being rewritten in Go for better performance.
- New features in TypeScript 6.0 include improved type-checking for function expressions in generic calls and updates to DOM types reflecting the latest web standards.
- TypeScript 6.0 introduces less context-sensitivity for functions without explicit `this` usage, improving type inference.
- Support for subpath imports starting with `#/` is added, aligning with Node.js updates.
- New flag `--stableTypeOrdering` is introduced to help with migrations between TypeScript 6.0 and 7.0 by ensuring deterministic type ordering.
- TypeScript 6.0 adds support for the `es2025` target and lib, including new built-in API types.
- New types for the Temporal API and 'upsert' methods (`getOrInsert`, `getOrInsertComputed`) on `Map` and `WeakMap` are included.
- The `dom` lib now contains `dom.iterable` and `dom.asynciterable` by default, simplifying configuration.
- Several breaking changes and deprecations are introduced in TypeScript 6.0, including defaults for `strict`, `module`, and `target` options, and deprecation of `target: es5` and `--moduleResolution node`.