UHG
Search
Close this search box.

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.

Share

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.

📣 Want to advertise in AIM? Book here

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!
Related Posts
Association of Data Scientists
Tailored Generative AI Training for Your Team
Upcoming Large format Conference
Sep 25-27, 2024 | 📍 Bangalore, India
Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

Flagship Events

Rising 2024 | DE&I in Tech Summit
April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore
Data Engineering Summit 2024
May 30 and 31, 2024 | 📍 Bangalore, India
MachineCon USA 2024
26 July 2024 | 583 Park Avenue, New York
MachineCon GCC Summit 2024
June 28 2024 | 📍Bangalore, India
Cypher USA 2024
Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA
Cypher India 2024
September 25-27, 2024 | 📍Bangalore, India
discord icon
AI Forum for India
Our Discord Community for AI Ecosystem, In collaboration with NVIDIA.