Symbol.dispose. For convenience, TypeScript defines a new global type called
A production release of TypeScript 5.2 is due August 22, following a release candidate planned for August 8. The TypeScript 5.2 beta can be accessed through NuGet or via NPM:
npm install -D typescript@beta
Other new capabilities in TypeScript 5.2:
- Decorator metadata, also an upcoming ECMAScript feature, is intended to make it easy for decorators to create and consume metadata on any class they are used on or within.
- An all-or-nothing restriction on the use of tuple labels has been lifted. The language now can preserve labels when spreading into an unlabeled tuple.
- Object member completions are provided when a comma is missing. Previously, if a comma were forgotten and auto-completion requested, TypeScript would confusingly give unrelated completion results.
- Easier method usage for unions of arrays means that methods like
reducecan be invoked on unions of arrays in cases where they previously did not work.
- A refactoring has been added to inline the contents of a variable to all usage sites. Using the “inline variable” refactoring will eliminate the variable and replace all the variable’s usages with its initializer.
Copyright © 2023 IDG Communications, Inc.