TypeScript
The official blog of the TypeScript team.
Latest posts
Progress on TypeScript 7 – December 2025
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
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
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
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
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
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
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
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
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
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...
Announcing TypeScript 5.4
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
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
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
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
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
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...
TypeScript’s Migration to Modules
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Spooky TypeScript challenges for beginner and intermediate programmers, day 1.
Announcing TypeScript 4.5 Beta
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
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 uses t...
Announcing the New TypeScript Homepage
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
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
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...
Announcing TypeScript 4.3
Today we're excited to announce the availability of TypeScript 4.3! If you're not yet familiar with TypeScript, it's a language that builds on JavaScript by adding syntax for static types. Tools like the TypeScript compiler can just erase TypeScript syntax, leaving you with clean readable JavaScript that works anywhere. So what's that syntax adding if it just gets erased away? Well, when you add types throughout your code, you're making your intentions explicit, and TypeScript can type-check your code to catch mistakes like typos, logic errors, and more! TypeScript also uses those types to power editor tooling...
Announcing TypeScript 4.3 RC
Today we're excited to announce our Release Candidate (RC) of TypeScript 4.3! Between now and the stable release of TypeScript 4.3, 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 Let's dive in to what TypeScript 4.3 brings! Separate Write Types on Properties In JavaScript, it's pretty common for APIs to convert values that are passed in before storing them. This often happens with g...
Announcing TypeScript 4.3 Beta
Today we're excited to announce our Beta of TypeScript 4.3! 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 Let's dive in to what TypeScript 4.3 brings! Separate Write Types on Properties In JavaScript, it's pretty common for APIs to convert values that are passed in before storing them. This often happens with getters and setters too. For example, let's imagine we've got a class with a setter that always converts a value into a before saving it in a private field. How would we type this JavaScr...
Announcing the New TypeScript Handbook
Hey folks, we're happy to announce that a fresh re-write of the TypeScript Handbook is out of beta and is now our website's primary resource for learning TypeScript! Read the handbook on Web / Epub / PDF In the last year, the TypeScript team has heavily focused on ramping up the scale, modernity and scope of our documentation. One of the most critical sections of our documentation is the handbook, a guided tour through the sort of TypeScript code you'll see in most codebases. We want the handbook to feel like the first recommendation you give for learning TypeScript. With the release of the revised website l...
Announcing TypeScript 4.2
Today we're excited to announce the release of TypeScript 4.2! For those who aren't familiar with TypeScript, it's an extension to JavaScript that adds static types and type-checking. With types, you can state exactly what your functions take, and what they'll return. You can then use the TypeScript type-checker to catch lots of common mistakes like typos, forgetting to handle and , and more. Because TypeScript code just looks like JavaScript with types, everything you know about JavaScript still applies. When you need, your types can be stripped out, leaving you with clean, readable, runnable JavaScript that...
Announcing TypeScript 4.2 RC
Today we're excited to announce our Release Candidate of TypeScript 4.2! Between now and the stable release of TypeScript 4.2, 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 Let's take a look at what's in store for TypeScript 4.2! Leading/Middle Rest Elements in Tuple Types In TypeScript, tuple types are meant to model arrays with specific lengths and element types. Over time, TypeScript's tuple types have become more and more sophisticat...
Announcing TypeScript 4.2 Beta
Today we're excited to announce the availability of TypeScript 4.2 Beta! 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 Let's take a look at what's in store for TypeScript 4.2! Leading/Middle Rest Elements in Tuple Types In TypeScript, tuple types are meant to model arrays with specific lengths and element types. Over time, TypeScript's tuple types have become more and more sophisticated, since they're also used to model things like parameter lists in JavaScript. As a result, they can have optio...
Announcing TypeScript 4.1
Today we're proud to release TypeScript 4.1! If you're unfamiliar 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 then output clean readable JavaScript that runs on lots of different runtimes. Static type-checking can tell us about errors in our code before we even run it, or before we even save our files thanks to TypeScript's rich editing functionality across editors. But beyond error-checking, TypeScript powers things like completions, quick fixes, and refactoring...
Announcing TypeScript 4.1 RC
Today we are making the Release Candidate (RC) of TypeScript 4.1 available. 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 For this release, we have some exciting new features, new checking flags, editor productivity updates, and speed improvements. Let's get a look at what 4.1 has in store for us! Template Literal Types String literal types in TypeScript allow us to model functions and APIs that expect a set of specific strings. This is pretty nice because ...
Announcing TypeScript 4.1 Beta
Today we're announcing the availability of TypeScript 4.1 Beta! 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 For this release, we have some exciting new features, new checking flags, editor productivity updates, and speed improvements. Let's get a look at what 4.1 has in store for us! Template Literal Types String literal types in TypeScript allow us to model functions and APIs that expect a set of specific strings. This is pretty nice because string l...
Announcing TypeScript 4.0
Today we are thrilled to announce the availability of TypeScript 4.0! This version of the language represents our next generation of TypeScript releases, as we dive deeper into expressivity, productivity, and scalability. If you're not familiar with TypeScript, it's a language that builds on top of JavaScript by adding syntax for static types. The idea is that by writing down the types of your values and where they're used, you can use TypeScript to type-check your code and tell you about mistakes before you run your code (and even before saving your file). You can then use the TypeScript compiler to then stri...
Announcing TypeScript 4.0 RC
Today we're announcing our release candidate of TypeScript 4.0. While this RC brings us closer to a new major version of TypeScript, don't fret - there are no larger breaking changes than usual. Our philosophy in evolving TypeScript has always been to provide an upgrade path that minimizes disruptive breaking changes while still giving ourselves some flexibility to flag suspicious code as errors when appropriate. For this reason, we're continuing with a similar versioning model to that of past releases, so 4.0 is just the natural continuation from TypeScript 3.9. To get started using the RC, you can get it ...
Announcing the new TypeScript Website
The new TypeScript website is live, with big changes to the handbook, playground and a new section covering the tsconfig.json.
Announcing TypeScript 4.0 Beta
Today we're excited to release the beta of the next major milestone in the TypeScript programming language: TypeScript 4.0. This beta takes us on our first step into TypeScript 4.0, and while it brings a new major version, don't fret - there are no substantially larger breaking changes than usual. Our philosophy in evolving TypeScript has always been to provide an upgrade path that minimizes disruptive breaking changes while still giving ourselves some flexibility to flag suspicious code as errors when appropriate. For this reason, we're continuing with a similar versioning model to that of past releases, so 4...
Changes to How We Manage DefinitelyTyped
For the past year, we’ve been working on tooling to protect the stability of the Definitely Typed ecosystem to the point where we can offer a more streamlined experience when contributing to DT repo – definition owners can now help merge PRs to their modules.
Announcing TypeScript 3.9
Today we're excited to announce the release of TypeScript 3.9! If you're unfamiliar 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 then output clean readable JavaScript that runs on lots of different runtimes. Static type-checking can tell us about errors in our code before we even run it, or before we even save our files thanks to TypeScript's rich editing functionality across editors. But beyond error-checking, TypeScript powers things like completions, quick fixe...
Announcing TypeScript 3.9 RC
Today we're announcing the availability of TypeScript 3.9 RC, the release candidate of TypeScript 3.9. Between now and the final release, 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 For this release our team been has been focusing on performance, polish, and stability. We've been working on speeding up the compiler and editing experience, getting rid of friction and papercuts, and reducing bugs and crashes. We've also received a number of usefu...
Announcing TypeScript 3.9 Beta
Today we're announcing the availability of TypeScript 3.9 Beta! 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 For this release our team been has been focusing on performance, polish, and stability. We've been working on speeding up the compiler and editing experience, getting rid of friction and papercuts, and reducing bugs and crashes. We've also received a number of useful and much-appreciated features and fixes from the external community! Improvements in Infe...
Announcing TypeScript 3.8
Today we're proud to release TypeScript 3.8! For those unfamiliar with TypeScript, it's a language that adds syntax for types on top of JavaScript which can be analyzed through a process called static type-checking. This type-checking can tell us about errors like typos and values that are potentially and before we even run our code. More than just that, that same type analysis can be used to provide a solid editing experience for both TypeScript and JavaScript, powering operations like code completion, find-all-references, quick fixes, and refactorings. In fact, if you're already using JavaScript in an edit...
Announcing TypeScript 3.8 RC
Today we're announcing the Release Candidate for TypeScript 3.8! Between this RC and our final release, we expect no 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: You can also get editor support by TypeScript 3.8 brings a lot of new features, including new or upcoming ECMAScript standards features, new syntax for importing/exporting only types, and more. Type-Only Imports and Export This feature is something most users may never have to think about; however, i...
Announcing TypeScript 3.8 Beta
Today we're announcing the availability of TypeScript 3.8 Beta! This Beta release contains all the new features you should expect from TypeScript 3.8's final release. To get started using the beta, you can get it through NuGet, or through npm with the following command: You can also get editor support by TypeScript 3.8 brings a lot of new features, including new or upcoming ECMAScript standards features, new syntax for importing/exporting only types, and more. Type-Only Imports and Export TypeScript reuses JavaScript's import syntax in order to let us ref...
Announcing TypeScript 3.7
We're thrilled to announce the release of TypeScript 3.7, a release packed with awesome new language, compiler, and tooling features. If you haven't yet heard of TypeScript, it's a language based on JavaScript that adds static type-checking along with type syntax. Static type-checking lets us know about problems with our code before we try to run it by reporting errors if we do something questionable. This ranges from type coercions that can happen in code like , or even basic typos on property names. But beyond this, TypeScript powers things like completions, quick fixes, and refactorings for both TypeScript ...
Announcing TypeScript 3.7 RC
We're pleased to announce TypeScript 3.7 RC, the release candidate of TypeScript 3.7. Between now and the final release, we expect no further changes except for 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 TypeScript 3.7 RC includes some of our most highly-requested features! Let's dive in and see what's new, starting with the highlight feature of 3.7: Optional Chaining. Optional Chaining TypeScript 3.7 implements one ...
Announcing TypeScript 3.7 Beta
We're pleased to announce TypeScript 3.7 Beta, a feature-complete version of TypeScript 3.7. Between now and the final release, we'll be fixing bugs and further improving performance and stability. 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 TypeScript 3.7 Beta includes some of our most highly-requested features! Let's dive in and see what's new, starting with the highlight feature of 3.7: Optional Chaining. Optional Chaining TypeScript 3.7 implements one of the most highly-demanded ECMAScript featu...
Announcing TypeScript 3.6
Today we're happy to announce the availability of TypeScript 3.6! For those unfamiliar, TypeScript is a language that builds on JavaScript by adding optional static types. These types can be checked by the TypeScript compiler to catch common errors in your programs (like misspelling properties and calling functions the wrong way). Tools like the TypeScript compiler and Babel can then be used to transform TypeScript code that uses all the latest and greatest standard features to standards-compliant ECMAScript code that will work on any browser or runtime (even much older ones that support ES3 or ES5). TypeSc...
Announcing TypeScript 3.6 RC
Today we're happy to announce the availability of the release candidate of TypeScript 3.6. This release candidate is intended to be fairly close to the full release, and will stabilize for the next few weeks leading up to our official release. 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 Let's explore what's coming in 3.6! Stricter Generators TypeScript 3.6 introduces stricter checking for iterators and generator functions. In earlier versions, users of generators had no way to differentiate whether a ...
Announcing TypeScript 3.6 Beta
Today we're happy to announce the availability of TypeScript 3.6 Beta. This beta is intended to be a feature-complete version of TypeScript 3.6. In the coming weeks we'll be working on bugs and improving performance and stability for our release candidate, and eventually the full release. 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 Let's explore what's coming in 3.6! Stricter Generators TypeScript 3.6 introduces stricter checking for iterators and generator functions. In earlier versions, users of g...
How to Upgrade to TypeScript without anybody noticing, Part 2
This guide will show you how to fix Typescript compile errors in Javascript project that recently added Typescript support via a . It assumes that the is configured according to the description in part 1 of this post, and that you also installed types for some of your dependencies from the namespace. This guide is more of a list of tasks that you can pick and choose from, depending on what you want to fix first. Here are the tasks: This guide does not teach you how to write type definitions. The Declaration section of the Typescript handbook is the best place to learn about that. He...
How to Upgrade to TypeScript Without Anybody Noticing, Part 1
This guide will show you how to upgrade to TypeScript without anybody noticing. Well, people might notice — what I really mean is that you won’t have to change your build at all. You’ll have the ability to get errors and completions in supported editors and to get errors on the command line from tsc, the TypeScript compiler, but you won’t have to integrate TypeScript into your build. Here’s what you’ll actually need to check in to source control: How can you upgrade with so little change? Well, the secret is that you’re not using TypeScript. The TypeScript compiler can check Javascript just fi...
Announcing TypeScript 3.5
Today we're happy to announce the availability of TypeScript 3.5! If you're new to TypeScript, it's a language that builds on JavaScript that adds optional static types. TypeScript code gets type-checked to avoid common mistakes like typos and accidental coercions, and then gets transformed by a program called the TypeScript compiler. The compiler strips out any TypeScript-specific syntax and optionally transforms your code to work with older browsers, leaving you with clean, readable JavaScript that can run in your favorite browser or Node.js. Built on top of all this is also a language service which uses all...
Announcing TypeScript 3.5 RC
Today we're happy to announce the availability of our release candidate (RC) of TypeScript 3.5. Our hope is to collect feedback and early issues to ensure our final release is simple to pick up and use right away. 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 Let's explore what's new in 3.5! Speed improvements TypeScript 3.5 introduces several optimizations around type-checking and incremental builds. Type-checking speed-ups Much of the expressivity of...
Announcing TypeScript 3.4
Today we're happy to announce the availability of TypeScript 3.4! If you haven't yet used TypeScript, it's a language that builds on JavaScript that adds optional static types. The TypeScript project provides a compiler that checks your programs based on these types to prevent certain classes of errors, and then strips them out of your program so you can get clean readable JavaScript code that will run in any ECMAScript runtime (like your favorite browser, or Node.js). TypeScript also leverages this type information to provide a language server, which can be used for powerful cross-platform editor tooling like...
Announcing TypeScript 3.4 RC
Today we're happy to announce the availability of our release candidate (RC) of TypeScript 3.4. Our hope is to collect feedback and early issues to ensure our final release is simple to pick up and use right away. 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 Let's explore what's new in 3.4! Faster subsequent builds with the flag Because TypeScript files are compiled, it introduces an intermediate step between writing and running your code. One of our goals is to minimize built time given any change ...
Announcing TypeScript 3.3
Today we're happy to announce the availability of TypeScript 3.3!If you're unfamiliar with TypeScript, it's a language that brings static type-checking to JavaScript so that you can catch issues before you even run your code - or before you even save your file. It also includes the latest JavaScript features from the ECMAScript standard on older browsers and runtimes by compiling those features into a form that they understand. But beyond type-checking and compiling your code, TypeScript also provides tooling in your favorite editor so that you can jump to the definition of any variable, find who's using a gi...
Announcing TypeScript 3.3 RC
Today we're happy to announce the availability of our release candidate (RC) of TypeScript 3.3. Our hope is to collect feedback and early issues to ensure our final release is simple to pick up and use right away.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 TypeScript 3.3 should be a smooth release to adopt, and contains no breaking changes. Let's explore what's new in 3.3. Improved behavior for calling union types When TypeScript has a union type A | B, it allows you to access all the properties common...
IntelliCode for TypeScript/JavaScript
At Build 2018, Microsoft announced Visual Studio IntelliCode, a set of capabilities that provide AI-assisted development. In collaboration with the IntelliCode team, we are excited to announce that we are now bringing IntelliCode to TypeScript/JavaScript users through the IntelliCode extension for VS Code. What is IntelliCode? IntelliCode augments your IntelliSense by recommending commonly used completion items for your current context at the top of your list. These contextual recommendations are generated by common practices learned from having IntelliCode train across thousands of real-world projects. Th...
Announcing TypeScript 3.2
TypeScript 3.2 is here today!If you're unfamiliar with TypeScript, it's a language that brings static type-checking to JavaScript so that you can catch issues before you even run your code - or before you even save your file. It also includes the latest JavaScript features from the ECMAScript standard on older browsers and runtimes by compiling those features into a form that they understand. But beyond type-checking and compiling your code, TypeScript also provides tooling in your favorite editor so that you can jump to the definition of any variable, find who's using a given function, and automate refactorings ...
Announcing TypeScript 3.2 RC
Today we're announcing TypeScript 3.2 RC, the release candidate of our next version of TypeScript. 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 for TypeScript 3.2 by: We have some important information below for NuGet users and Visual Studio 2015 users, so please continue reading if you use either product. Let's look at some of what's coming in TypeScript 3.2! strictBindCallApply As you might've guessed from the title of this section, TypeScript 3.2 introduces stricter checking for bind, call, and appl...
Announcing TypeScript 3.1
Today we're announcing the release of TypeScript 3.1!If you haven't heard of TypeScript, it's a language that builds on top of modern JavaScript and adds static type-checking. When you write TypeScript code, you can use a tool like the TypeScript compiler to remove type-specific constructs, and rewrite any newer ECMAScript code to something that older browsers & runtimes can understand. Additionally, using types means that your tools can analyze your code more easily, and provide you with a rock-solid editing experience giving you things like code-completion, go-to-definition, and quick fixes. On top of that,...
Announcing TypeScript 3.1 RC
Today we're happy to announce the availability of the release candidate (RC) of TypeScript 3.1. Our intent with the RC is to gather any and all feedback so that we can ensure our final release is as pleasant as possible.If you'd like to give it a shot now, you can get the RC through NuGet, or use npm with the following command: You can also get editor support by Let's look at what's coming in TypeScript 3.1! Mappable tuple and array types Mapping over values in a list is one of the most common patterns in programming. As an example, let's take a look at the following JavaScript code: ...
TypeScript and Babel 7
Today we're excited to announce something special for Babel users.Over a year ago, we set out to find what the biggest difficulties users were running into with TypeScript, and we found that a common theme among Babel users was that trying to get TypeScript set up was just too hard. The reasons often varied, but for a lot of developers, rewiring a build that's already working can be a daunting task. Babel is a fantastic tool with a vibrant ecosystem that serves millions of developers by transforming the latest JavaScript features to older runtimes and browsers; but it doesn't do type-checking, which our team b...
Announcing TypeScript 3.0
TypeScript 3.0 is here! Today marks a new milestone in the TypeScript journey, serving JavaScript users everywhere.If you're unfamiliar with TypeScript, it's not too late to learn about it now! TypeScript is an extension of JavaScript that aims to bring static types to modern JavaScript. The TypeScript compiler reads in TypeScript code, which has things like type declarations and type annotations, and emits clean readable JavaScript with those constructs transformed and removed. That code runs in any ECMAScript runtime like your favorite browsers and Node.js. At its core, this experience means analyzing your ...
Announcing TypeScript 3.0 RC
TypeScript 3.0, our next release of the type system, compiler, and language service, is fast-approaching! Today we're excited to announce the Release Candidate of TypeScript 3.0! We're looking to get any and all feedback from this RC to successfully ship TypeScript 3.0 proper, so if you'd like to give it a shot now, you can get the RC through NuGet, or use npm with the following command: You can also get editor support by While Visual Studio 2015 doesn't currently have an RC installer, TypeScript 3.0 will be available for Visual Studio 2015 users. While you can read about everything on ...
Announcing TypeScript 2.9
Today we're announcing the release of TypeScript 2.9!If you're not familiar with TypeScript, it's a language that adds optional static types to JavaScript. Those static types help make guarantees about your code to avoid typos and other silly errors. They can also provide nice things like code completions and easier project navigation thanks to tooling built around those types. When your code is run through the TypeScript compiler, you're left with clean, readable, and standards-compliant JavaScript code, potentially rewritten to support much older browsers that only support ECMAScript 5 or even ECMAScript 3. ...
Announcing TypeScript 2.9 RC
Today we're excited to announce and get some early feedback with TypeScript 2.9's Release Candidate. To get started with the RC, you can access it through NuGet, or use npm with the following command: You can also get editor support by Let's jump into some highlights of the Release Candidate! Support for symbols and numeric literals in keyof and mapped object types TypeScript's keyof operator is a useful way to query the property names of an existing type. Unfortunately, because keyof predates TypeScript's ability to reason about unique symbol types, keyof never recognized symboli...
Announcing TypeScript 2.8
TypeScript 2.8 is here and brings a few features that we think you'll love unconditionally! If you're not familiar with TypeScript, it's a language that adds optional static types to JavaScript. Those static types help make guarantees about your code to avoid typos and other silly errors. They can also help provide nice things like code completions and easier project navigation thanks to tooling built around those types. When your code is run through the TypeScript compiler, you're left with clean, readable, and standards-compliant JavaScript code, potentially rewritten to support much older browsers that only...
Announcing TypeScript 2.8 RC
Today we're excited to announce and get some early feedback with TypeScript 2.8's Release Candidate. To get started with the RC, you can access it through NuGet, or use npm with the following command: You can also get editor support by Let's jump into some highlights that are available in our RC! Conditional Types TypeScript 2.8 introduces a new construct called conditional types. This new construct is based on JavaScript's conditional syntax, and takes the form A extends B ? C : D. You should mentally read this as "if the type A is assignable to B, then the type boils down to C, a...
Announcing TypeScript 2.7
Today we're proud to announce the release of TypeScript 2.7! If you're not familiar with TypeScript, it's a language that brings optional static types to JavaScript by building on JavaScript itself. Running TypeScript code through its compiler emits clean readable JavaScript that runs on any browser, and can also make bleeding-edge ECMAScript features you write work on older browsers. That means that you can take advantage of the design time tooling and safety of types (like code completion & navigation), while still leveraging the familiarity, community, and ubiquity of JavaScript. But if you already k...
Announcing TypeScript 2.7 RC
Today we're publishing the Release Candidate of TypeScript 2.7. To get started with the RC, you can access it through NuGet, or use npm with the following command: Visual Studio 2015 users (who have Update 3) can install TypeScript 2.7 RC from here, and Visual Studio 2017 users using version 15.2 or later will be able to get TypeScript by simply installing it from here. You can also get the Release Candidate working with Visual Studio Code and Sublime Text. While we have many new features and fixes, we have a few highlights for the RC we think are especially important. Definite Assignment Checks for...
Announcing TypeScript 2.6
TypeScript 2.6 is here in time for Halloween, but have no fear! We've got some great treats for you in this release. If you haven't heard of TypeScript, it's a language that builds on top of the most up-to-date versions of JavaScript by adding optional static types. These types don't just help catch things like typos and logic errors; they also can bring you even better tooling like editor completions, easier navigation of your codebase, and more. Best of all, you don't always have to write out your type annotations - TypeScript can often infer them for you! To learn more about TypeScript itself, you can visit...
Announcing TypeScript 2.6 RC
TypeScript 2.6 RC is now available! To get started with the latest stable version of TypeScript, you can grab it through NuGet, or use the following command with npm: Visual Studio 2015 users (who have Update 3) can install TypeScript 2.6 RC from here, and Visual Studio 2017 users using version 15.2 or later will be able to get TypeScript by simply installing it from here. You can get TypeScript 2.6 RC working with Visual Studio Code and Sublime Text, though the full release of TypeScript 2.6 will be available out of the box. Let's take a look at what TypeScript 2.6 will bring! Contravariant function para...
TypeScript Turns 5
This past weekend marked 5 full years since we released TypeScript publicly! Just half a decade ago, we announced our project with the ambitious goal of "getting JavaScript development to scale." At the time, it was clear to us that JavaScript's usage was growing, but with that, so were many of the pain points as codebases would grow. Things like renaming properties, avoiding typos, and navigating codebases were not simple. Fast forward to today, and JavaScript has become even more ubiquitous. While ECMAScript has advanced significantly, it still suffers from many of the same problems of managing complex c...
Announcing TypeScript 2.5
Today we're happy to bring you TypeScript 2.5! If you've read our RC announcement, we've got a few new items that we're proud to highlight! If you're not familiar with TypeScript, it's a typed superset of JavaScript. More simply put, it's just JavaScript with optional static types. Static types can make it easier to maintain your code by catching bugs early on, making it easier to navigate your projects, giving accurate code completion, and providing handy fixes for when you do make mistakes. By making types optional, you can get the flexibility of plain JavaScript when you need it, all while TypeScript also gi...
Announcing TypeScript 2.5 RC
Announcing TypeScript 2.5 RC Today we're happy to announce our RC of TypeScript 2.5. To get started with the latest stable version of TypeScript, you can grab it through NuGet, or use the following command with npm: Visual Studio 2015 users (who have Update 3) can install TypeScript 2.5 RC from here, and Visual Studio 2017 users using version 15.2 or later will be able to get TypeScript by simply installing it from here. While TypeScript 2.5 will be available for other editors soon, in the meantime you can configure Visual Studio Code and Sublime Text to use a newer version. Other editors may have different...
Announcing TypeScript 2.4
Today we're excited to announce the release of TypeScript 2.4! If you haven't yet heard of TypeScript, it's a superset of JavaScript that brings static types and powerful tooling to JavaScript. These static types are entirely optional and get erased away - you can gradually introduce them to your existing JavaScript code, and get around to adding them when you really need. At the same time, you can use them aggressively to your advantage to catch painful bugs, focus on more important tests that don't have to do with types, and get a complete editing experience. In the end, you can run TypeScript code through t...
Announcing TypeScript 2.4 RC
Today we're releasing our RC of TypeScript 2.4. To get started with the latest stable version of TypeScript, you can grab it through NuGet, or use the following command with npm: Visual Studio 2015 users (who have Update 3) can install TypeScript from here, and Visual Studio 2017 users using Update 2 will be able to get TypeScript by simply installing it from here. To get it working elsewhere, you can easily configure Visual Studio Code and our Sublime Text plugin to pick up whatever version you need. Other editors may have different approaches to swapping TypeScript in. Dynamic Import Expressions TypeScript ...
New TypeScript Quick Starts and Updates from Build 2017
Last week Microsoft hosted its annual Build conference close to home in Seattle. Build is the single largest developer-focused conference that the company hosts, and draws a huge crowd from around the world! The TypeScript team had the pleasure of meeting some friendly faces of our community, along with plenty of new people who were excited to learn about and try out TypeScript. If we got the chance to meet and chat with you, thank you for the opportunity to speak and give us your thoughts. It's humbling to meet our users personally, and we always appreciate getting feedback about the work we're doing. New qui...
Announcing TypeScript 2.3
Today we're excited to bring you our latest release with TypeScript 2.3! For those who aren't familiar, TypeScript is a superset of JavaScript that brings users optional static types and solid tooling. Using TypeScript can help avoid painful bugs people commonly run into when writing JavaScript by type-checking your code. TypeScript can actually report issues without you even saving your file, and leverage the type system to help you write code even faster. This leads to a truly awesome editing experience, giving you time to think about and test the things that really matter. To get started with the latest st...
Announcing TypeScript 2.3 RC
The TypeScript 2.3 Release Candidate is here today! This release brings more ECMAScript features, new settings to make starting projects easier, and more. To get started with the release candidate, you can grab it through NuGet or over npm through You can also get TypeScript for Visual Studio 2015 (if you have Update 3). Our team is working on supporting Visual Studio 2017 in the near future, with details available on our previous blog post. Other editor support will be coming with the proper release, but you can follow instructions to enable newer versions of TypeScript in Visual Studio Code and Sublime Te...
TypeScript’s New Release Cadence
One of the things we love about the TypeScript community is the enthusiasm around new features and rapid adoption of new TypeScript releases. Because of this, we have been focusing on increasing the velocity and consistency of TypeScript releases so that you can get your hands on the latest features even more quickly and predictably. This new release cadence has been mostly great, but there has been some confusion on when and how to get the latest TypeScript version. There have also been questions regarding availability of TypeScript in Visual Studio 2017. This blog post aims to clarify our intentions and our gen...
Announcing TypeScript 2.2
Today our team is happy to present our latest release with TypeScript 2.2! For those who haven't yet heard of it, TypeScript is a simple extension to JavaScript to add optional types along with all the new ECMAScript features. TypeScript builds on the ECMAScript standard and adds type-checking to make you way more productive through cleaner code and stronger tooling. Your TypeScript code then gets transformed into clean, runnable JavaScript that even older browsers can run. While there are a variety of ways to get TypeScript set up locally in your project, the easiest way to get started is to try it out on our...
Announcing TypeScript 2.2 RC
TypeScript 2.2 is just around the corner, and today we're announcing its release candidate! If you're first hearing about it, TypeScript is a language that just takes JavaScript and adds optional static types. Being built on JavaScript means that you don't have to learn much more beyond what you know from JavaScript, and all your existing code continues to work with TypeScript. Meanwhile, the optional types that TypeScript adds can help you catch pesky bugs and work more efficiently by enabling great tooling support. To try out the RC today, you can use NuGet, or using npm just run You can also get the TypeS...
Writing Declaration Files for @types
A while back we talked about how TypeScript 2.0 made it easier to grab declaration files for your favorite library. Declaration files, if you're not familiar, are just files that describe the shape of an existing JavaScript codebase to TypeScript. By using declaration files (also called files), you can avoid misusing libraries and get things like completions in your editor. As a recap of that previous blog post, if you're using an npm package named and it doesn't ship any files, you can just run and things will just work from there. But you might have asked yourself things like "where do these 'at-types...
Announcing TypeScript 2.1
We spread ourselves thin, but this is the moment you've been awaiting - TypeScript 2.1 is here! For those who are unfamiliar, TypeScript is a language that brings you all the new features of JavaScript, along with optional static types. This gives you an editing experience that can't be beat, along with stronger checks against typos and bugs in your code. This release comes with features that we think will drastically reduce the friction of starting new projects, make the type-checker much more powerful, and give you the tools to write much more expressive code. To start using TypeScript you can use NuGet, o...
TypeScript 2.1 RC: Better Inference, Async Functions, and More
Today we're happy to announce our release candidate for TypeScript 2.1! If you aren't familiar with it, TypeScript is a language that adds optional static types to JavaScript, and brings new features from ES6 and later to whatever JavaScript runtime you're using. As usual you can get the RC through NuGet, or just by running You can then easily use the RC release with Visual Studio Code or our Sublime Text Plugin. You can also grab the TypeScript 2.1 installer for Visual Studio 2015 after getting Update 3. While TypeScript 2.1 has a lot of great features coming up, we'd like to highlight how much more powe...
TypeScript 2.0 is now available!
Today we're excited to announce the final release of TypeScript 2.0! TypeScript 2.0 has been a great journey for the team, with several contributions from the community and partners along the way. It brings several new features that enhance developer productivity, advances TypeScript's alignment with ECMAScript's evolution, provides wide support for JavaScript libraries and tools, and augments the language service that powers a first class editing experience across tools. To get started, you can download TypeScript 2.0 for Visual Studio 2015 (which needs Update 3), grab it with NuGet, start using TypeScript 2.0...
Announcing TypeScript 2.0 RC
TypeScript 2.0 is almost out, and today we're happy to show just how close we are with our release candidate! If you haven't used TypeScript yet, check out the intro tutorial on our website to get started. To start using the RC now, you can download TypeScript 2.0 RC for Visual Studio 2015 (which requires VS Update 3), grab it through NuGet, or use npm: Visual Studio Code users can follow the steps here to use the RC. This RC gives an idea of what the full version of 2.0 will look like, and we're looking for broader feedback to stabilize and make 2.0 a solid release. Overall, the RC should be stable enough for...
Announcing TypeScript 2.0 Beta
Today we're excited to roll out our beta release of TypeScript 2.0. If you're not familiar with TypeScript yet, you can start learning it today on our website. To get your hands on the beta, you can download TypeScript 2.0 Beta for Visual Studio 2015 (which will require VS 2015 Update 3), or just run This release includes plenty of new features, such as our new workflow for getting files, but here's a couple more features just to get an idea of what else is in store. Non-nullable Types and are two of the most common sources of bugs in JavaScript. Before TypeScript 2.0, and were in the domain of every typ...
The Future of Declaration Files
Declaration files ( files) are a fundamental part of using existing JavaScript libraries in TypeScript, but getting them has always been a place where we've known there was room for improvement. As we get closer to TypeScript 2.0, we're very excited to show off a sneak peak of our plan to simplify things. Getting type declarations in TypeScript 2.0 will require no tools apart from npm. As an example, getting the declarations for a library like lodash will be just an npm command away: From there you'll be able to use lodash in your TypeScript code with no fuss. This works for both modules and global code. For...
Making New TypeScript Projects a Breeze
One of the goals of TypeScript has always been to make writing JavaScript projects a clean, easy, and simple process. We're always looking at where things could be improved and listening to the community to get ideas on how to do this better. You may've recently heard the term "JavaScript fatigue" thrown around to describe the feeling of starting up a new JavaScript project. What it generally boils down to is that there are many tools, with tons of configurations, and with that combination the number of decisions you need to make can be overwhelming. That means that adding a new tool might just be out of the que...
New TypeScript Website
Today we are thrilled to release a new TypeScript website! The new site delivers a fresh design, more up-to-date documentation, and soon a new series of quick start guides. Documentation TypeScript is developed on GitHub, and as such, all of the documentation is written in markdown on the TypeScript Handbook repo. This is primarily done to easily allow contributions. Any community member can make edits to the documentation by simply dropping a pull request on the handbook repo. While this is great for community collaboration, previously, updating the website docs from the wiki was a very slow and manual process. ...
Announcing TypeScript 1.8
Today we are thrilled to announce the release of TypeScript 1.8. In the TypeScript 1.8 Beta release blog post, we highlighted some of the key features that are now available to TypeScript users - how JavaScript in TypeScript compilation provides a great way forward to start converting your JavaScript projects to TypeScript, improvements to JSX/TSX support, and our move to ChakraCore. This post supplements the above and details how TypeScript 1.8 provides full support for module augmentation, delivers a stronger type system with string literal types, and catches even more common bugs with smarter control flow anal...
Announcing TypeScript 1.8 Beta
Today we are releasing a beta of TypeScript 1.8. There are quite a lot of changes coming in the 1.8 release, so please check them out and send us your feedback. TypeScript 1.8 beta is available for Visual Studio 2015, NuGet (Compiler and MSBuild task), npm, and straight from the source. For npm users, make sure to use the following command: > npm install -g typescript@beta You can also get TypeScript 1.8 beta in VS Code by downloading the above npm package and updating your with the following: JavaScript in TypeScript Compilation In TypeScript 1.8, the TypeScript compiler can now consume Java...
Announcing TypeScript 1.7
Today, we are thrilled to announce the release of TypeScript 1.7 along with the availability of Visual Studio 2015 Update 1. This release enables async/await by default for ECMAScript 6 (ES6) targets. It also adds support for polymorphic 'this' typing, proposed ECMAScript 2016 exponentiation syntax, and ES6 module targeting. For a complete change list, check out our roadmap on GitHub.As always, you can get your hands on TypeScript 1.7 for Visual Studio 2015 Update 1, Visual Studio 2013, on npm, or straight from the source.Async/Await for ES6 targetsWith the 1.7 release, TypeScript now supports Async functions for...
What about Async/Await?
We’ve heard your feedback that you’re excited about async/await in TypeScript. Async/await allows developers to write to asynchronous code flows as if they were synchronous, removing the need for registering event handlers or writing separate callback functions. You may have seen similar patterns in C#. TypeScript’s async/await pattern makes use of Promises, much like C#’s async/await pattern leverages Tasks. Promises are objects that represent ongoing asynchronous actions and are a built-in feature of ECMAScript 6 (ES6). TypeScript’s async/await is implemented as proposed for ES2016 (aka ES7). We’re happy to ...
Announcing TypeScript 1.6
Today, we're happy to announce the release of TypeScript 1.6. This release adds support for React/JSX, class expressions, and a rich set of new capabilities in the type system. It also provides stricter type checking for object literals. You can download TypeScript 1.6 for Visual Studio 2015, Visual Studio 2013, on npm, or as source. React/JSX Designed with feedback from React experts and the React team, we've built full-featured support for React typing and the JSX support in React. Below, you can see TypeScript code happily coexisting with JSX syntax within a single file with the new .tsx extension. ...
Announcing TypeScript 1.6 Beta: React/JSX, better error checking, and more
Today, we’re making a beta of the upcoming TypeScript 1.6 available. There are a bunch of new features coming in the 1.6 release, and we wanted to give you a preview of these features and time to give us feedback. You can get this for Visual Studio 2015, Visual Studio 2013, NPM, and source. React/JSX support One of the key philosophies of TypeScript is to let you write TypeScript anywhere you can develop using JavaScript. While we’ve worked with teams such as Dojo, Aurelia, and Angular to ensure using TypeScript is as easy as using JavaScript, there was still an important library that that presented a ...
Introducing TypeScript npm nightlies
To make it easier to try out the very latest in TypeScript, we're now publishing the TypeScript nightly npm package. You can try this out using:npm install -g typescript@nextWe've set this to update each night, and we timestamp each release. You can see what version you're on with the --version commandline switch:C:\Users>tsc --versionmessage TS6029: Version 1.6.0-dev.20150727Please note: since this is the coming straight from the bleeding edge source, it may have bugs or incompatibilities. If you find any, please let us know the usual way.
Announcing TypeScript 1.5
Today we’re happy to announce the release of TypeScript 1.5. This release took an alpha, a beta, and your help to get here. It’s a big one, so let’s get started! TypeScript 1.5 is part of the newly released Visual Studio 2015. You can also get a separate download for Visual Studio 2013, npm, and straight from GitHub. ES6 support TypeScript 1.5 - closing the gap on Kangax ES6 support TypeScript 1.5 adds a number of new ES6 features including modules, destructuring, spread, for..of, symbols, computed properties, let/const, and tagged string templates. There is quite a bit of information av...
The TypeScript Team is Hiring!
The TypeScript team is hiring! We’ve been growing, and we have lots of exciting plans ahead. Here are some of the things you’ll do as part of the TypeScript team: Work on the compiler – Every compiled language needs a compiler, and TypeScript has a good one. As we add language features and continue to align with the ever-growing JavaScript language, we’re continually working to improve what we have and ensure we’re building on a solid foundation. Work on editors/IDEs – In addition to the compiler, the TypeScript team builds the TypeScript language service, ...
Developing in TypeScript on a Mac with Sublime
Within the TypeScript team, many of us have Macs that we use for development. We’ve also heard from some of you that you’d like to use your OS X machines to build TypeScript projects. So recently, we’ve been focusing on building a natural and rich developer toolset for Mac and Linux fans. Starting with TypeScript 1.5, TypeScript projects have complete tooling support in OS X using Sublime, Atom, and Visual Studio Code. In this article, we’ll be talking about how to set up your Mac for developing TypeScript using Sublime. Getting started First, install the TypeScript compiler, which you...
Using TypeScript in Visual Studio Code
With the recent announcement of Visual Studio Code, there have been a lot of questions about how to get started writing TypeScript. In this quickstart, we’ll create a simple TypeScript project. Out of the box, Visual Studio Code supports TypeScript 1.5 beta and using either the node or Visual Studio command-line compilers. For this quickstart, because of its use of the new tsconfig.json feature, we assume you already have TypeScript 1.5 beta installed. Let’s start by making a new empty folder, MyProject, and opening it in Visual Studio Code. In Window, click “Open Folder&...