TypeScript

The official blog of the TypeScript team.

Latest posts

Announcing TypeScript 6.0 Beta
Feb 11, 2026
Post comments count 2
Post likes count 3

Announcing TypeScript 6.0 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are announcing the beta release of TypeScript 6.0! To get started using the beta, you can get it through npm with the following command: TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase. As announced last year (with recent updates here), we are working on a new codebase for the TypeScript compiler and language service written in Go that takes advantage of the speed of native code and shared-memory multi-threading. This new codebase will be the foundation of TypeScript 7.0 and beyond. TypeScript 6.0 will be the immediate pre...

Progress on TypeScript 7 – December 2025
Dec 2, 2025
Post comments count 21
Post likes count 21

Progress on TypeScript 7 – December 2025

Daniel Rosenwasser
Daniel Rosenwasser

Earlier this year, the TypeScript team announced that we've been porting the compiler and language service to native code to take advantage of better raw performance, memory usage, and parallelism. This effort (codenamed "Project Corsa", and soon "TypeScript 7.0") has been a significant undertaking, but we've made big strides in the past few months. We're excited to give some updates on where we are, and show you how "real" the new TypeScript toolset is today. We also have news about our upcoming roadmap, and how we're prioritizing work on TypeScript 7.0 to drive our port to completion. Editor Support and L...

Announcing TypeScript 5.9
Aug 1, 2025
Post comments count 2
Post likes count 10

Announcing TypeScript 5.9

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the release of TypeScript 5.9! If you're not familiar with TypeScript, it's a language that builds on JavaScript by adding syntax for types. With types, TypeScript makes it possible to check your code to avoid bugs ahead of time. The TypeScript type-checker does all this, and is also the foundation of great tooling in your editor and elsewhere, making coding even easier. If you've written JavaScript in editors like Visual Studio and VS Code, TypeScript even powers features you might already be using like completions, go-to-definition, and more. You can learn more about Type...

Announcing TypeScript 5.9 RC
Jul 25, 2025
Post comments count 1
Post likes count 5

Announcing TypeScript 5.9 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the Release Candidate (RC) of TypeScript 5.9! To get started using the Release Candidate, you can get it through npm with the following command: Let's take a look at what's new in TypeScript 5.9! What's New Since the Beta? A few reported fixes have been made since the 5.9 beta, including the restoration of to the DOM library. Additionally, we have added a section about Notable Behavioral Changes. Minimal and Updated For a while, the TypeScript compiler has supported an flag that can create a within the current directory. In the l...

Announcing TypeScript 5.9 Beta
Jul 8, 2025
Post comments count 1
Post likes count 8

Announcing TypeScript 5.9 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the availability of TypeScript 5.9 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.9! Minimal and Updated For a while, the TypeScript compiler has supported an flag that can create a within the current directory. In the last few years, running created a very "full" , filled with commented-out settings and their descriptions. We designed this with the intent of making options discoverable and easy to toggle. However, given external feedback (a...

Announcing TypeScript Native Previews
May 22, 2025
Post comments count 6
Post likes count 23

Announcing TypeScript Native Previews

Daniel Rosenwasser
Daniel Rosenwasser

This past March we unveiled our efforts to port the TypeScript compiler and toolset to native code. This port has achieved a 10x speed-up on most projects - not just by using a natively-compiled language (Go), but also through using shared memory parallelism and concurrency where we can benefit. Since then, we have made several strides towards running on large complex real-world projects. Today, we are excited to announce broad availability of TypeScript Native Previews. As of today, you will be able to use npm to get a preview of the native TypeScript compiler. Additionally, you'll be able to use a previe...

A 10x Faster TypeScript
Mar 11, 2025
Post comments count 84
Post likes count 191

A 10x Faster TypeScript

Anders Hejlsberg
Anders Hejlsberg

Today I'm excited to announce the next steps we're taking to radically improve TypeScript performance. The core value proposition of TypeScript is an excellent developer experience. As your codebase grows, so does the value of TypeScript itself, but in many cases TypeScript has not been able to scale up to the very largest codebases. Developers working in large projects can experience long load and check times, and have to choose between reasonable editor startup time or getting a complete view of their source code. We know developers love when they can rename variables with confidence, find all referen...

Announcing TypeScript 5.8
Feb 28, 2025
Post comments count 1
Post likes count 14

Announcing TypeScript 5.8

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the release of TypeScript 5.8! If you're not familiar with TypeScript, it's a language that builds on top of JavaScript by adding syntax for 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, TypeScript and its ecosystem powers the JavaScript experience in both of those editors as well! To get sta...

Announcing TypeScript 5.8 RC
Feb 13, 2025
Post comments count 0
Post likes count 4

Announcing TypeScript 5.8 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the Release Candidate (RC) of TypeScript 5.8! To get started using the Release Candidate, you can get it through npm with the following command: Let's take a look at what's new in TypeScript 5.8! What's New Since the Beta? Since our beta release, we have had to pull back some work on how functions with conditional return types are checked. Based on some of the limitations and changes we wanted to make, we decided to iterate on the feature with the goal of shipping it in TypeScript 5.9. However, as part of this work, we added more granular checks for branches within return ...

Announcing TypeScript 5.8 Beta
Jan 29, 2025
Post comments count 1
Post likes count 12

Announcing TypeScript 5.8 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the availability of TypeScript 5.8 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.8! Checked Returns for Conditional and Indexed Access Types Consider an API that presents a set of options to a user: The intent with is that it shows a UI element that can allow selecting either a single option or multiple options. When it does this is determined by the parameter. When is , the return type of should be , and when it is , the return type should be . The problem is that the typ...

Announcing TypeScript 5.7
Nov 22, 2024
Post comments count 2
Post likes count 11

Announcing TypeScript 5.7

Daniel Rosenwasser
Daniel Rosenwasser

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
Nov 8, 2024
Post comments count 0
Post likes count 9

Announcing TypeScript 5.7 RC

Daniel Rosenwasser
Daniel Rosenwasser

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 &quot...

Announcing TypeScript 5.7 Beta
Oct 9, 2024
Post comments count 5
Post likes count 5

Announcing TypeScript 5.7 Beta

Daniel Rosenwasser
Daniel Rosenwasser

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
Sep 9, 2024
Post comments count 1
Post likes count 19

Announcing TypeScript 5.6

Daniel Rosenwasser
Daniel Rosenwasser

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
Aug 23, 2024
Post comments count 0
Post likes count 3

Announcing TypeScript 5.6 RC

Daniel Rosenwasser
Daniel Rosenwasser

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
Jul 26, 2024
Post comments count 2
Post likes count 4

Announcing TypeScript 5.6 Beta

Daniel Rosenwasser
Daniel Rosenwasser

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
Jun 20, 2024
Post comments count 5
Post likes count 10

Announcing TypeScript 5.5

Daniel Rosenwasser
Daniel Rosenwasser

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
Jun 6, 2024
Post comments count 1
Post likes count 7

Announcing TypeScript 5.5 RC

Daniel Rosenwasser
Daniel Rosenwasser

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
Apr 25, 2024
Post comments count 6
Post likes count 4

Announcing TypeScript 5.5 Beta

Daniel Rosenwasser
Daniel Rosenwasser

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...

Announcing TypeScript 5.4
Mar 6, 2024
Post comments count 0
Post likes count 8

Announcing TypeScript 5.4

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the release of TypeScript 5.4! 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.4 RC
Feb 22, 2024
Post comments count 2
Post likes count 1

Announcing TypeScript 5.4 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate of TypeScript 5.4! Between now and the stable release of TypeScript 5.4, 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.4! What's New Since the Beta? Since the beta, we've updated the release notes to document new notable behavioral changes, including restrictions around enum compatibility, restrictions on enum member naming, and improvements in mapped type behavior. Pre...

Announcing TypeScript 5.4 Beta
Jan 29, 2024
Post comments count 4
Post likes count 6

Announcing TypeScript 5.4 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the availability of TypeScript 5.4 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.4! Preserved Narrowing in Closures Following Last Assignments TypeScript can usually figure out a more specific type for a variable based on checks that you might perform. This process is called narrowing. One common pain-point was that these narrowed types weren't always preserved within function closures. Here, TypeScript decided that it wasn't "safe...

Announcing TypeScript 5.3
Nov 20, 2023
Post comments count 3
Post likes count 6

Announcing TypeScript 5.3

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the release of TypeScript 5.3! If you're not familiar with TypeScript, it's a language that adds type syntax to JavaScript to bring type-checking. Type-checking can catch all sorts of issues like typos and forgetting to check for and . But types go beyond type-checking - the same analyses of TypeScript's type-checker are used for rich editor tooling like auto-completion, code navigation, and refactorings. In fact, if you've been writing JavaScript in editors like Visual Studio or VS Code, that experience is powered by TypeScript! To get started using TypeScript, you can get i...

Announcing TypeScript 5.3 RC
Nov 3, 2023
Post comments count 0
Post likes count 1

Announcing TypeScript 5.3 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate of TypeScript 5.3! Between now and the stable release of TypeScript 5.3, 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.3! What's New Since the Beta? The beta permitted to be used across module resolution settings, but did not document it. Since the beta was released, we've added an option to prefer -only auto-imports when possible. Import Attributes TypeScr...

Announcing TypeScript 5.3 Beta
Oct 3, 2023
Post comments count 5
Post likes count 5

Announcing TypeScript 5.3 Beta

Daniel Rosenwasser
Daniel Rosenwasser

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
Aug 24, 2023
Post comments count 5
Post likes count 4

Announcing TypeScript 5.2

Daniel Rosenwasser
Daniel Rosenwasser

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
Aug 9, 2023
Post comments count 2
Post likes count 3

Announcing TypeScript 5.2 RC

Daniel Rosenwasser
Daniel Rosenwasser

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
Jun 30, 2023
Post comments count 9
Post likes count 0

Announcing TypeScript 5.2 Beta

Daniel Rosenwasser
Daniel Rosenwasser

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
Jun 1, 2023
Post comments count 2
Post likes count 3

Announcing TypeScript 5.1

Daniel Rosenwasser
Daniel Rosenwasser

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
May 18, 2023
Post comments count 0
Post likes count 4

Announcing TypeScript 5.1 RC

Daniel Rosenwasser
Daniel Rosenwasser

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
May 12, 2023
Post comments count 2
Post likes count 8

Introducing Deopt Explorer

Ron Buckton
Ron Buckton

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
Apr 18, 2023
Post comments count 1
Post likes count 6

Announcing TypeScript 5.1 Beta

Daniel Rosenwasser
Daniel Rosenwasser

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
Mar 16, 2023
Post comments count 7
Post likes count 36

Announcing TypeScript 5.0

Daniel Rosenwasser
Daniel Rosenwasser

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...

TypeScript’s Migration to Modules
Mar 9, 2023
Post comments count 5
Post likes count 9

TypeScript’s Migration to Modules

Daniel Rosenwasser Jake Bailey
Daniel,
Jake

One of the most impactful things we've worked on in TypeScript 5.0 isn't a feature, a bug fix, or a data structure optimization. Instead, it's an infrastructure change. In TypeScript 5.0, we restructured our entire codebase to use ECMAScript modules, and switched to a newer emit target. What to Know Now, before we dive in, we want to set expectations. It's good to know what this does and doesn't mean for TypeScript 5.0. As a general user of TypeScript, you'll need to be running Node.js 12 at a minimum. s should go a little faster and take up less space, since the package size should be reduced by about 46...

Announcing TypeScript 5.0 RC
Mar 1, 2023
Post comments count 0
Post likes count 3

Announcing TypeScript 5.0 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate of TypeScript 5.0! Between now and the stable release of TypeScript 5.0, we expect no further changes apart from critical bug fixes. This release brings many new features, while aiming to make TypeScript, smaller, simpler, and faster. We've implemented the new decorators standard, functionality to better support ESM projects in Node and bundlers, new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified configuration, and made many other improvements. While the 5.0 release includes correctness changes and depre...

Announcing TypeScript 5.0 Beta
Jan 26, 2023
Post comments count 10
Post likes count 25

Announcing TypeScript 5.0 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our beta 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, functionality to better support ESM projects in Node and bundlers, new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified configuration, and made many other improvements. While the 5.0 release includes correctness changes and deprecations for less-used flags, we believe most users will have a similar upgrade experience as in previous releases. To g...

Announcing TypeScript 4.9
Nov 15, 2022
Post comments count 6
Post likes count 10

Announcing TypeScript 4.9

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the availability of TypeScript 4.9! If you're not familiar with TypeScript, it's a language that builds on JavaScript by adding types and type-checking. Types can describe things like the shapes of our objects, how functions can be called, and whether a property can be or . TypeScript can check these types to make sure we're not making mistakes in our programs so we can code with confidence. It can also power other tooling like auto-completion, go-to-definition, and refactorings in the editor. In fact, if you've used an editor like Visual Studio or VS Code for JavaScript, th...

Announcing TypeScript 4.9 RC
Nov 1, 2022
Post comments count 3
Post likes count 4

Announcing TypeScript 4.9 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate (RC) of TypeScript 4.9. Between now and the stable release of TypeScript 4.9, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.9! What's New Since the Beta? TypeScript 4.9 beta originally included auto-accessors in classes, along with the performance improvements described below; however, these did not get documented in the 4.9 be...

Ten Years of TypeScript
Oct 1, 2022
Post comments count 6
Post likes count 11

Ten Years of TypeScript

Daniel Rosenwasser
Daniel Rosenwasser

Today is TypeScript's birthday! But this birthday is a special one - 10 years ago today, on October 1st, 2012, TypeScript was unveiled publicly for the first time. The Early Days When TypeScript first debuted, there was a lot of skepticism - and understandably so. To some JavaScript users, a team trying to bring static types to JavaScript might have sounded like an evil plot or a joke. But the features had merit, right? Type-checking, catching bugs before you even save your file, and getting rich editor features like code-completion, navigation, and refactorings? We knew teams inside and outside of our com...

Announcing TypeScript 4.9 Beta
Sep 23, 2022
Post comments count 8
Post likes count 6

Announcing TypeScript 4.9 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we're announcing our beta release of TypeScript 4.9! To get started using the beta, you can get it through NuGet, or- use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.9! The Operator TypeScript developers are often faced with a dilemma: we want to ensure that some expression matches some type, but also want to keep the most specific type of that expression for inference purposes. For example: Notice that we've written , whereas we probably should have written . We could try to catch that typo by usin...

Announcing TypeScript 4.8
Aug 25, 2022
Post comments count 3
Post likes count 9

Announcing TypeScript 4.8

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the release of TypeScript 4.8! If you're not yet familiar with TypeScript, it's a language that builds on JavaScript and adds syntax for types. These types let you put your expectations and assumptions into your code, and those assumptions can then be checked by the TypeScript type-checker. This checking can help avoid typos, calling uninitialized values, mixing up arguments for functions, and more. Types go beyond checking though, and are used to give you a powerful editing experience for both TypeScript and JavaScript, enabling code completion, go-to-definition, renaming, and...

Announcing TypeScript 4.8 RC
Aug 11, 2022
Post comments count 1
Post likes count 4

Announcing TypeScript 4.8 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate (RC) of TypeScript 4.8. Between now and the stable release of TypeScript 4.8, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.8! What's New Since the Beta? Since our beta release, the RC now has support for excluding which files are considered in auto-imports. The beta release post also did not document a break around unused dest...

Announcing TypeScript 4.8 Beta
Jun 21, 2022
Post comments count 1
Post likes count 0

Announcing TypeScript 4.8 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we're announcing our beta release of TypeScript 4.8! To get started using the beta, you can get it through NuGet, or- use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.8! Improved Intersection Reduction, Union Compatibility, and Narrowing TypeScript 4.8 brings a series of correctness and consistency improvements under . These changes affect how intersection and union types work, and are leveraged in how TypeScript narrows types. For example, is close in spirit to the union type because it accepts ,...

Announcing TypeScript 4.7
May 24, 2022
Post comments count 8
Post likes count 0

Announcing TypeScript 4.7

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the availability of TypeScript 4.7! If you're not yet familiar with TypeScript, it's a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you're working with and what kinds of functions you're calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting to check for and ! But this type-checking isn't the only thing TypeScript does - it uses the information from these types to give you an amazing editing experience, powering things like code-completions, go-to-defin...

Announcing TypeScript 4.7 RC
May 11, 2022
Post comments count 2
Post likes count 0

Announcing TypeScript 4.7 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate (RC) of TypeScript 4.7! Between now and the stable release of TypeScript 4.7, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.7! What's New Since the Beta? In our beta release, we announced a stable target for our Node ESM support called ; however, Node.js 12 is no longer under maintenance, so we've started the stable targ...

Announcing TypeScript 4.7 Beta
Apr 8, 2022
Post comments count 7
Post likes count 0

Announcing TypeScript 4.7 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the beta release of TypeScript 4.7! To get started using the beta, you can use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.7! ECMAScript Module Support in Node.js For the last few years, Node.js has been working to support ECMAScript modules (ESM). This has been a very difficult feature, since the Node.js ecosystem is built on a different module system called CommonJS (CJS). Interoperating between the two brings large challenges, with many new features to juggl...

A Proposal For Type Syntax in JavaScript
Mar 9, 2022
Post comments count 54
Post likes count 2

A Proposal For Type Syntax in JavaScript

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our support and collaboration on a new Stage 0 proposal to bring optional and erasable type syntax to JavaScript. Because this new syntax wouldn't change how surrounding code runs, it would effectively act as comments. We think this has the potential to make TypeScript easier and faster to use for development at every scale. We'd like to talk about why we're pursuing this, and how this proposal works at a high level. Background One recent trend our team has seen in the JavaScript world is a demand for faster iteration time and a reduction of build steps. In other words, &qu...

Announcing TypeScript 4.6
Feb 28, 2022
Post comments count 0
Post likes count 0

Announcing TypeScript 4.6

Daniel Rosenwasser
Daniel Rosenwasser

Today we're announcing the availability of TypeScript 4.6. If you're not yet familiar with TypeScript, it's a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you're working with and what kinds of functions you're calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting to check for and ! But this type-checking isn't the only thing TypeScript does - it uses the information from these types to give you an amazing editing experience, powering things like code-completions, go-to-definition, re...

Announcing TypeScript 4.6 RC
Feb 11, 2022
Post comments count 0
Post likes count 0

Announcing TypeScript 4.6 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate (RC) of TypeScript 4.6! Between now and the stable release of TypeScript 4.6, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: You can also get editor support by If you've already read our beta blog post, you can read up on what's changed since. Here's a quick list of what's new in TypeScript 4.6! What's New Since the Beta? When we announced our beta, we missed two great features - co...

Announcing TypeScript 4.6 Beta
Jan 21, 2022
Post comments count 2
Post likes count 0

Announcing TypeScript 4.6 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the beta release of TypeScript 4.6! To get started using the beta, you can get it through NuGet, or use npm with the following command: You can also get editor support by Here's a quick list of what's new in TypeScript 4.6! Allowing Code in Constructors Before  In JavaScript classes it's mandatory to call  before referring to . TypeScript enforces this as well, though it was a bit too strict in how it ensured this. In TypeScript, it was previously an error to contain any code at the beginning of a constructor if its cont...

Announcing TypeScript 4.5
Nov 17, 2021
Post comments count 3
Post likes count 0

Announcing TypeScript 4.5

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the release of TypeScript 4.5! If you're not yet familiar with TypeScript, it's a language that builds on JavaScript by adding statically checked types. When you use static types, you can run the TypeScript compiler to check for bugs like typos and mismatches in the shapes of your data, and get handy suggestions. These types don't change your program, and you can remove them to leave you with clean, readable JavaScript. Going beyond catching bugs in your code, TypeScript also assists you in writing code because types can power useful tooling like auto-complete, go-to-definition...

Announcing TypeScript 4.5 RC
Nov 2, 2021
Post comments count 1
Post likes count 0

Announcing TypeScript 4.5 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate (RC) of TypeScript 4.5! Between now and the stable release of TypeScript 4.5, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: You can also get editor support by If you've already read our beta blog post, you can read up on what's changed since. Some major highlights of TypeScript 4.5 are: What's New Since the Beta? Since our beta release post, 4.5 has gone through a...

Type | Treat – Wrap-up
Oct 30, 2021
Post comments count 0
Post likes count 1

Type | Treat – Wrap-up

Orta Therox
Orta Therox

Type | Treat Challenge Wrap-up That's all the challenges done! If you missed any of the challenges they're all available in the Playground here. Let's talk through the final answers to day 5's challenges. Yesterday's Solution Beginner/Learner Challenge In this challenge we were working with an existing object literal which had been 'd. The goal was to use and to extract interesting sets of strings from the object. The first being the keys in the object: Ideally, you might have noticed the 'key of' in the comment, which could have led you to , from there you needed to re-use to extract the type from . Th...

Type | Treat – Day 5
Oct 29, 2021
Post comments count 1
Post likes count 0

Type | Treat – Day 5

Orta Therox
Orta Therox

Type | Treat Challenge 5 Welcome to the fifth, and last, challenge! These challenges are a series of blog posts which have 2 code challenges in, one for beginners and one for intermediate TypeScript programmers. We're on day five, which means going over the answers from yesterday and have 2 new challenges. Yesterday's Solution Beginner/Learner Challenge This challenge aimed to be generics 101, first introducing the concept of making your function pass a type from the function to the argument: The acted as hint clue about where to look, and this example is almost the first code sample on the Generics ...

Type | Treat 2021 – Day 4
Oct 28, 2021
Post comments count 2
Post likes count 0

Type | Treat 2021 – Day 4

Orta Therox
Orta Therox

Type | Treat Challenge 4 Welcome to the fourth challenge! These challenges are a series of blog posts which have 2 code challenges in, one for beginners and one for intermediate TypeScript programmers. We're on day four, which means going over the answers from yesterday and have 2 new challenges. Yesterday's Solution Beginner/Learner Challenge I wonder if we over-indexed on the difficulty here, and we're interested if you dropped off somewhere through this task because we had less submissions than usual for this challenge. The goal was to have you build out a template string literal type which accounted for ...

Type | Treat 2021 – Day 3
Oct 27, 2021
Post comments count 2
Post likes count 0

Type | Treat 2021 – Day 3

Orta Therox
Orta Therox

Type | Treat Challenge 3 Welcome to the third challenge! These challenges are a series of blog posts which have 2 code challenges in, one for beginners and one for intermediate TypeScript programmers. We're on day three, which means going over the answers from yesterday and have 2 new challenges. Yesterday's Solution Beginner/Learner Challenge There is many ways to decide how to type existing data, you could use literal types when you're sure of the exact formats - or be more liberal and use when you expect a variety. We opted for literals, but using is totally cool too. The second part of the chall...

Type | Treat 2021 – Day 2
Oct 26, 2021
Post comments count 0
Post likes count 0

Type | Treat 2021 – Day 2

Orta Therox
Orta Therox

Type | Treat Challenge 2 Welcome to the second challenge! These challenges are a series of blog posts which have 2 code challenges in, one for beginners and one for intermediate TypeScript programmers. We're on day two, which means going over the answers from yesterday and showcasing 2 new challenges. Yesterday's Solution Beginner/Learner Challenge The first part of the solution for this challenge used to trigger "Literal Inference" - basically telling TypeScript "Don't convert the array to but consider it a constant set of string literals. This meant that stopped returning and started returning . ...

Type | Treat 2021 – Day 1
Oct 25, 2021
Post comments count 1
Post likes count 0

Type | Treat 2021 – Day 1

Orta Therox
Orta Therox

Spooky TypeScript challenges for beginner and intermediate programmers, day 1.

Announcing TypeScript 4.5 Beta
Oct 1, 2021
Post comments count 5
Post likes count 0

Announcing TypeScript 4.5 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the beta release of TypeScript 4.5! To get started using the beta, you can get it through NuGet, or use npm with the following command: You can also get editor support by Some major highlights of TypeScript 4.5 are: ECMAScript Module Support in Node.js For the last few years, Node.js has been working to support running ECMAScript modules (ESM). This has been a very difficult feature to support, since the foundation of the Node.js ecosystem is built on a different module system called CommonJS (CJS). I...

Announcing TypeScript 4.4
Aug 26, 2021
Post comments count 4
Post likes count 0

Announcing TypeScript 4.4

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce the availability of TypeScript 4.4! If you haven't heard of TypeScript yet, it's a language that builds on JavaScript by adding syntax for static types. Tools like the TypeScript compiler just erase those types, leaving you with clean readable JavaScript that you can run anywhere; but those types are there to be type-checked! Types make your intentions explicit, and tools can read and understand them to catch errors before you even run your code. By checking your types, TypeScript can catch errors like typos, logic errors, and more! Beyond catching errors, TypeScript also u...

Announcing the New TypeScript Homepage
Aug 24, 2021
Post comments count 5
Post likes count 0

Announcing the New TypeScript Homepage

Orta Therox
Orta Therox

Hey folks, we're happy to announce that the next iteration version of the TypeScript Website has been switched on for the TypeScript homepage. Last August we deployed a re-design and re-architecture of the entire TypeScript web presence. The goals were to provide new foundations for documenting TypeScript, re-organize our information architecture and to have a cohesive design wrapping it together. The transition to the new site aimed for evolution over revolution with all previous URIs still accounted for because "cool URIs don't change", and most decisions about how to describe TypeScript staying reasonably con...

Announcing TypeScript 4.4 RC
Aug 12, 2021
Post comments count 0
Post likes count 0

Announcing TypeScript 4.4 RC

Daniel Rosenwasser
Daniel Rosenwasser

Today we're excited to announce our Release Candidate (RC) of TypeScript 4.4! Between now and the stable release of TypeScript 4.4, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: You can also get editor support by Some major highlights of TypeScript 4.4 are: Let's explore these in more detail! Control Flow Analysis of Aliased Conditions and Discriminants In JavaScript, we often have to probe a variable in different ways to see if it ha...

Announcing TypeScript 4.4 Beta
Jul 1, 2021
Post comments count 6
Post likes count 0

Announcing TypeScript 4.4 Beta

Daniel Rosenwasser
Daniel Rosenwasser

Today we are excited to announce the beta release of TypeScript 4.4! To get started using the beta, you can get it through NuGet, or use npm with the following command: You can also get editor support by Some major highlights of TypeScript 4.4 are: Let's explore these in more detail! Control Flow Analysis of Aliased Conditions In JavaScript, we often have to probe a variable in different ways to see if it has a more specific type that we can use. TypeScript understands these checks and calls them type guards. Instead of having to convince TypeScrip...