MITB Banner

Microsoft launches TypeScript 4.7 Beta

In the coming weeks, the TypeScript team will be polishing version 4.7 to get it ready for a Release Candidate.

Microsoft has announced the beta release of TypeScript 4.7. The  key features of the latest version of the open-source programming language include:

  • ECMAScript Module Support in Node.js: The researchers had been struggling for years to implement module support in Node.js. TypeScript 4.7 ends this struggle as it adds this functionality with two new module settings: node12 and nodenext.
  • Control over Module Detection: TypeScript 4.7 introduces a new option called ‘moduleDetection’ for Javascript code. 
  • Control-Flow Analysis for Computed Properties: TypeScript 4.7 now analyses the type of computed properties and narrows them correctly. The new version knows that obj[key] is a string. Meaning, TypeScript can correctly check that computed properties are initialised by the end of a constructor body.
  • Instantiation Expressions: TypeScript 4.7 can now take functions and constructors and feed them type arguments directly. With this, you can specialise makeBox to accept more specific types and reject anything else. This logic also works for constructor functions such as Array, Map, and Set.
  • Optional Variance Annotations for Type Parameters: In this version, variance on type parameters can be explicitly specified. 
  • Resolution Customization with moduleSuffixes: TypeScript 4.7 now supports a moduleSuffixes option to customise how module specifiers are looked up. This feature can be useful for React Native projects where each target platform can use a separate tsconfig.json with differing moduleSuffixes.
  • Resolution-mode: TypeScript now allows /// <reference types=”…” /> directives and import type statements to specify a resolution strategy.
  • Groups-Aware Organize Imports: TypeScript has an Organize Imports editor feature for both JavaScript and TypeScript. 

In the coming weeks, the TypeScript team will be polishing version 4.7 to get it ready for a Release Candidate.

Access all our open Survey & Awards Nomination forms in one place >>

Picture of Kartik Wali

Kartik Wali

A writer by passion, Kartik strives to get a deep understanding of AI, Data analytics and its implementation on all walks of life. As a Senior Technology Journalist, Kartik looks forward to writing about the latest technological trends that transform the way of life!

Download our Mobile App

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox
Recent Stories