TypeScript 6.0
4 hours ago
- #JavaScript
- #Programming
- #TypeScript
- TypeScript 6.0 is now available, marking a transition towards TypeScript 7.0, which will be based on a new Go codebase.
- Key features in TypeScript 6.0 include less context-sensitivity on 'this'-less functions, support for subpath imports starting with '#/', and combining '--moduleResolution bundler' with '--module commonjs'.
- New flags like '--stableTypeOrdering' help align TypeScript 6.0 with the upcoming 7.0 release, ensuring smoother transitions.
- TypeScript 6.0 introduces new types for Temporal API, 'upsert' methods (getOrInsert), and RegExp.escape, enhancing developer experience.
- The DOM lib now includes 'dom.iterable' and 'dom.asynciterable', simplifying configurations for modern web projects.
- Breaking changes and deprecations in TypeScript 6.0 include default changes for 'strict', 'module', and 'target', and the deprecation of 'target: es5' and '--moduleResolution node'.
- Developers are encouraged to prepare for TypeScript 7.0 by addressing deprecation warnings in TypeScript 6.0.