What’s new in TypeScript 3.1

TypeScript 3.1 adds properties on function declarations, and moves away from the namespaces construct

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 release candidate for TypeScript 3.1, which focuses on programming enhancements, some of which can break existing code.

Where to download TypeScript

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

Future version: What’s coming in TypeScript 3.1

The release candidate for TypeScript 3.1, an upcoming upgrade to Microsoft’s typed superset of JavaScript, focuses on programming enhancements.

Version 3.1 adds properties on function declarations. Thus, for any function or const declaration that is initialized with a function, the type-checker analyzes the containing scope to track added properties. This change is intended to make TypeScript smarter about patterns.

To continue reading this article register now