TypeScript 6.0 Officially Released
The official release of TypeScript 6.0 has been announced, marking the final version built on its JavaScript codebase. The development team is planning a future migration of the compiler to Go. The release notes emphasize significant changes, and developers are advised to review migration guides for a smooth transition.
- The primary motivation for rewriting the compiler in Go is to address performance and scalability challenges. The current compiler, written in TypeScript and running on Node.js, is not optimized for compute-intensive workloads, leading to slow build times and high memory usage in large projects. - TypeScript 6.0 is intentionally a transitional or "bridge" release designed to prepare the ecosystem for the new native compiler in version 7.0. It introduces deprecations and breaking changes to align with the future Go-based version. - This release deprecates several features, including the `target: es5` option, the `asserts` keyword on imports (in favor of `with`), and the legacy `module` syntax for `namespaces`. Developers can temporarily ignore these deprecations in 6.0, but they will not be supported in 7.0. - The new native compiler effort, codenamed "Project Corsa," is expected to drastically improve performance, with goals of reducing most build times by a factor of 10 and significantly lowering memory usage. - The performance improvements from the Go migration will impact the developer experience, speeding up build processes, type-checking, and editor features like autocomplete in VS Code. It will not change the runtime performance of the compiled JavaScript that runs in browsers or on servers. - Led by Microsoft Technical Fellow Anders Hejlsberg, the creator of C#, TypeScript was first released in October 2012 to add static typing to JavaScript for large-scale application development. - The native port will focus on the compiler (`tsc`) and the language service that powers editor features. Previews of the new Go-based toolset are already available for developers to test via a VS Code extension and an npm package. - Following this release, the team will not release a version 6.1, focusing development almost entirely on the native 7.0 version. The 6.x line will only receive patches for critical issues.