TypeScript
The official blog of the TypeScript team.
Latest posts

Announcing TypeScript 5.3 Beta

Today we are excited to announce the availability of TypeScript 5.3 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: Here's a quick list of what's new in TypeScript 5.3! Import Attributes TypeScript 5.3 supports the latest updates to the import attributes proposal. One use-case of import attributes is to provide information about the expected format of a module to the runtime. The contents of these attributes are not checked by TypeScript since they're host-specific, and are simply left alone so that browsers and runt...

Announcing TypeScript 5.2

Today we're excited to announce the release of TypeScript 5.2! If you're not familiar with TypeScript, it's a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with and , and more. Types also power TypeScript's editor tooling like the auto-completion, code navigation, and refactorings that you might see in Visual Studio and VS Code. In fact, if you've been writing JavaScript in either of those editors, you've been using TypeScript all this...

Announcing TypeScript 5.2 RC

Today we're excited to announce our Release Candidate of TypeScript 5.2! Between now and the stable release of TypeScript 5.2, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: Here's a quick list of what's new in TypeScript 5.2! What's New Since the Beta? Since the Beta, we've added a type-checking optimization and made it possible to reference the paths of TypeScript implementation files in type-only imports. Declarations and Explicit Resource Management TypeScript 5.2 ...

Announcing TypeScript 5.2 Beta

Today we are excited to announce the availability of TypeScript 5.2 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: Here's a quick list of what's new in TypeScript 5.2! Declarations and Explicit Resource Management TypeScript 5.2 adds support for the upcoming Explicit Resource Management feature in ECMAScript. Let's explore some of the motivations and understand what the feature brings us. It's common to need to do some sort of "clean-up" after creating an object. For example, you might need to close network connec...

Announcing TypeScript 5.1

Today we're excited to announce the release of TypeScript 5.1! If you're not yet familiar with TypeScript, it's a language that builds on JavaScript by adding constructs called types. These types can describe some details about our program, and can be checked by TypeScript before they're compiled away in order to catch possible typos, logic bugs and more. TypeScript also uses these types to provide editor tooling like code completions, refactorings, and more. In fact, if you already write JavaScript in editors like Visual Studio or VS Code, that experience is already powered up by TypeScript! You can learn mo...

Announcing TypeScript 5.1 RC

Today we're excited to announce our Release Candidate of TypeScript 5.1! Between now and the stable release of TypeScript 5.1, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: Here's a quick list of what's new in TypeScript 5.1! What's New Since the Beta? Since the beta, we've corrected some of our behavior for hooks in decorators as the proposed behavior has been adjusted. We've also made changes to our emit behavior under , ensuring that script files are not rewritte...

Introducing Deopt Explorer
Over the past few months, during the lead-up to the TypeScript 5.0 beta, our team spent a good portion of our time looking for ways to improve the performance of our compiler so that your projects build faster. One of the ways we improved was by looking into an oft overlooked aspect of many JavaScript VMs: inline caching. A Brief Primer on Inline Caching Inline caching is an optimization often used in both statically typed and dynamically typed languages. An inline cache, or IC, is a set of instructions whose goal is to speed up operations like method calls and property lookups. It does this by taking a slo...

Announcing TypeScript 5.1 Beta

Today we're announcing our beta release of TypeScript 5.1! To get started using the beta, you can get it through NuGet, or through npm with the following command: Here's a quick list of what's new in TypeScript 5.1! Easier Implicit Returns for -Returning Functions In JavaScript, if a function finishes running without hitting a , it returns the value . However, in previous versions of TypeScript, the only functions that could have absolutely no return statements were - and -returning functions. That meant that even if you explicitly said "this function returns " you were f...

Announcing TypeScript 5.0

Today we're excited to announce the release of TypeScript 5.0! This release brings many new features, while aiming to make TypeScript smaller, simpler, and faster. We've implemented the new decorators standard, added functionality to better support ESM projects in Node and bundlers, provided new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified configuration, and made many other improvements. If you're not familiar with TypeScript yet, it's a language that builds on JavaScript by adding syntax for types which can be used for type-checking. Type-checking can he...