What’s new in TypeScript 2.9

The new Version 2.9 of the JavaScript superset adds support for object literals and numeric types—but also can break your existing code

Become An Insider

Sign up now and get FREE access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content. Learn more.

Microsoft has released the production version of TypeScript 2.9.

Where to download TypeScript

You can download TypeScript through NuGet or via NPM. To get TypeScript 2.8 via NPM, use the following command: npm install -g typescript.

Current version: What’s new in TypeScript 2.9

New features in TypeScript 2.9

The release candidate features support for object literals and numeric types, via the keyof operator and mapped object types. Keyof, which already is part of TypeScript, provides a way to query property names of an existing type. But this operator has predated TypeScript’s ability to reason about unique symbol types, so it never recognized symbolic keys. TypeScript 2.9 changes the behavior of keyof to factor in unique symbols and literal types. Also, mapped object types such as Partial and Readonly can recognize symbolic and numeric property keys; properties named by symbols will no longer be dropped.

To continue reading this article register now