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.

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


AI Hackathons, Coding & Learning

Host Hackathons & Recruit Great Data Talent!

AIM Research

Pioneering advanced AI market research

Request Customised Insights & Surveys for the AI Industry


Strengthen Critical AI Skills with Trusted Corporate AI Training

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

AIM Leaders Council

World’s Biggest Community Exclusively For Senior Executives In Data Science And Analytics.

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

Subscribe to Our Newsletter

The Belamy, our weekly Newsletter is a rage. Just enter your email below.