Microsoft Announces Availability of TypeScript Version 5.1, Highlights Changes Since Beta and Release Candidate

2023-06-03 10:12:25

Today, Microsoft is pleased to announce the release of TypeScript 5.1! If you’re not familiar with TypeScript yet, it’s a language that builds on top of JavaScript by adding constructs called types. These types can describe certain details of your program and can be checked by TypeScript before being compiled in order to detect possible typos, logical bugs and much more. TypeScript also uses these types to provide editing tools such as code completions, refactorings, etc. In fact, if you already write JavaScript in editors like Visual Studio or VS Code, that experience is already powered by TypeScript!

To get started using TypeScript, you can get this via NuGetor more commonly via npm with the following command:

npm install -D typescript

What’s new since beta and RC?

From beta, we fixed some of our behavior for init hooks in decorators, because the proposed behavior has been adjusted. We also have changed the behavior of emit under isolatedModules, ensuring that script files are not rewritten into modules. This also means that using the API transpileModule will also ensure that script files are not interpreted as modules, as it assumes the use ofisolatedModules.

Since RC, we’ve slightly iterated on our built-in refactorings to move declarations to existing files; however, we believe the implementation still needs some improvement. As a result, you may not be able to access it in most editors at this time, and you may only be able to do so by using a nightly version of TypeScript. We anticipate that TypeScript 5.2 or a future TypeScript 5.1 patch will introduce this refactoring.

Decoupled type checking between JSX elements and JSX tag types

One of TypeScript’s pain points with JSX was its requirements on the type of each JSX element tag. This version of TypeScript allows JSX libraries to more accurately describe what JSX components can return. For many, this means concretely that it will be possible to use asynchronous server components in react.

next steps

Our team is already hard at work on TypeScript 5.2, and you can read the details on the plan d’itration de TypeScript 5.2. In addition to scheduled work items, this iteration plan outlines target release dates that you can use for your own plans. The best way to play with what’s next is totry a nightly version of TypeScript, and also to use the nightly version of theexprience d’dition.

But don’t feel rushed to get ahead! We hope you enjoy TypeScript 5.1 and that this release will make coding fun.

Source : Microsoft

And you ?

What is your opinion on the subject?

What do you think of the features offered by this version of TypeScript?

See as well

Microsoft announces availability of TypeScript 5.1 release candidate (RC), showing what’s new since the beta release

Microsoft announces the release of the beta version of TypeScript 5.1, and brings usability updates to functions returning undefined, as well as several performance improvements

Microsoft announces the availability of TypeScript 5.0, and presents the main notable changes since the release of the beta version

1685788620
#Microsoft #Announces #Availability #TypeScript #Version #Highlights #Beta #Release #Candidate

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.