TypeScript
The official blog of the TypeScript team.
Latest posts
Announcing TypeScript 5.7
Today we excited to announce the availability of TypeScript 5.7! If you're not familiar with TypeScript, it's a language that builds on JavaScript by adding syntax for type declarations and annotations. This syntax can be used by the TypeScript compiler to type-check our code, and it can also be erased to emit clean, idiomatic JavaScript code. Type-checking is helpful because it can catch bugs in our code ahead of time, but adding types to our code also makes it more readable and allows tools like code editors to give us powerful features like auto-completion, refactorings, find-all-references, and more. TypeScr...
Announcing TypeScript 5.7 RC
Today we are announcing the availability of the release candidate of TypeScript 5.7. To get started using the RC, you can get it through npm with the following command: Let's take a look at what's new in TypeScript 5.7! Checks for Never-Initialized Variables For a long time, TypeScript has been able to catch issues when a variable has not yet been initialized in all prior branches. Unfortunately, there are some places where this analysis doesn't work. For example, if the variable is accessed in a separate function, the type system doesn't know when the function will be called, and instead takes an "...
Announcing TypeScript 5.7 Beta
Today we are announcing the availability of TypeScript 5.7 Beta. To get started using the beta, you can get it through npm with the following command: Let's take a look at what's new in TypeScript 5.7! Checks for Never-Initialized Variables For a long time, TypeScript has been able to catch issues when a variable has not yet been initialized in all prior branches. Unfortunately, there are some places where this analysis doesn't work. For example, if the variable is accessed in a separate function, the type system doesn't know when the function will be called, and instead takes an "optimistic" ...
Announcing TypeScript 5.6
Today we're excited to announce the release of TypeScript 5.6! If you're not familiar with TypeScript, it's a language that builds on top of JavaScript by adding syntax for types. Types describe the shapes we expect of our variables, parameters, and functions, and the TypeScript type-checker can help catch issues like typos, missing properties, and bad function calls before we even run our code. Types also power TypeScript's editor tooling like the auto-completion, code navigation, and refactorings that you might see in editors like Visual Studio and VS Code. In fact, if you write JavaScript in either of th...
Announcing TypeScript 5.6 RC
Today we are excited to announce the availability of the release candidate of TypeScript 5.6. To get started using the RC, you can get it through npm with the following command: Here's a quick list of what's new in TypeScript 5.6! What's New Since the Beta? Since TypeScript 5.6 beta, we reverted a change around how TypeScript's language service searched for files. Previously the language service would keep walking up looking for every possible project file named that might contain a file. Because this could lead to opening many referenced projects, we reverted the beh...
Announcing TypeScript 5.6 Beta
Today we are excited to announce the availability of TypeScript 5.6 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.6! Disallowed Nullish and Truthy Checks Maybe you've written a regex and forgotten to call on it: or maybe you've accidentally written (which creates an arrow function) instead of (the greater-than-or-equal-to operator): or maybe you've tried to use a default value with , but mixed up the precedence of and a comparison operator like : or...
Announcing TypeScript 5.5
Today we're excited to announce the release of TypeScript 5.5! 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 editors like Visual Studio and VS Code. In fact, if you write JavaScript in either of those editors, that experience is powered by Type...
Announcing TypeScript 5.5 RC
Today we are excited to announce the availability of the release candidate of TypeScript 5.5. 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.5! What's New Since the Beta? Since the beta, we've made a few changes that we wanted to call out. For one, we added support for ECMAScript's new methods. Additionally, we've adjusted the behavior of TypeScript's new regular expression checking to be slightly more lenient, while still erroring on questionable escapes tha...
Announcing TypeScript 5.5 Beta
Today we are excited to announce the availability of TypeScript 5.5 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.5! Inferred Type Predicates This section was written by Dan Vanderkam, who implemented this feature in TypeScript 5.5. Thanks Dan! TypeScript's control flow analysis does a great job of tracking how the type of a variable changes as it moves through your code: By making you handle the case, TypeScript pushes you to write more robust code...