TypeScript version 4.7 beta launch leave developers 'delighted' with new features
A host of new features are headed to the programming language which is undergoing a period of rapid development


Microsoft has released the latest version of TypeScript (4.7) in beta and introduced various new features that have met with excitement from the language’s programmers.
The tech giant has continued its rapid development with the programming language after only having released the previous stable version (4.6) in March this year.
The introduction of ECMAScript Modules (ESM) in TypeScript is one of the standout additions to the latest release and has been described by users as a “huge step forwards” for the language.
ESM is a module format Node.js has been working to implement for years but development has been “very difficult”, according to Microsoft, since Node is built on an older system called CommonJS (CJS) which uses modules differently.
TypeScript 4.5 previously introduced nightly-only support for ESM in Node to get feedback from users and with version 4.7, support for interoperability between ESM and CJS is now available in TypeScript.
Some developers have expressed concern about how they will be forced to implement ESM in existing projects, despite widespread excitement.
Certain existing TypeScript code will have to be re-written to accommodate a new syntax of ESM, with some files having to use a JavaScript file type (.js extension) even when referring to TypeScript files.
Sign up today and you will receive a free copy of our Future Focus 2025 report - the leading guidance on AI, cybersecurity and other IT challenges as per 700+ senior executives
Developers have called this confusing, and Microsoft said the re-writing process “might feel cumbersome at first”, but in many cases, TypeScript tooling like auto-imports and path completion will make the change automatically for developers.
TypeScript version 4.7 also introduces instantiation expressions which allow developers to specify type arguments for generic functions or constructors without calling them.
Developers can now create specific instantiations of generic class constructors or functions using a new expression syntax, feeding them type arguments directly.
When a function or constructor is given one or more type arguments, they essentially make an alias of the original and replace the corresponding type parameters with the provided type arguments while dropping all the other signatures as it will assume these are not meant to be used.
Programmers also stand to benefit from variance annotations for type parameters, which bring the potential for clearer, more explicitly typed code for outsiders to more easily see how a type parameter is used. It can be difficult to understand if a type should be read, written, or both, especially with more complex types, so it stands to benefit teams working on a complex codebase.
Microsoft also said the feature can also bring performance benefits since TypeScript can type-check larger structural types with more precision and speed.
Full details on the host of new features coming to TypeScript can be found in Microsoft’s detailed release notes.

Connor Jones has been at the forefront of global cyber security news coverage for the past few years, breaking developments on major stories such as LockBit’s ransomware attack on Royal Mail International, and many others. He has also made sporadic appearances on the ITPro Podcast discussing topics from home desk setups all the way to hacking systems using prosthetic limbs. He has a master’s degree in Magazine Journalism from the University of Sheffield, and has previously written for the likes of Red Bull Esports and UNILAD tech during his career that started in 2015.
-
Reducing security and network complexity during cloud adoption
whitepaper
-
What will the Quantum-Safe 360 Alliance mean for your business and its post-quantum security posture?
In-depth Businesses face renewed calls to prepare for a post-encryption world, with tech giants like IBM and Thales urging businesses to take critical steps now
-
Senior developers are all in on vibe coding, but junior staff lack the experience to spot critical flaws
News Experienced developers are far more confident in using AI-generated code
-
Hexaware partners with Replit to take secure 'vibe coding' to the enterprise
News The new collaboration enables business teams to create secure, production-grade applications without the need for traditional coding skills
-
Microsoft says AI is finally having a 'meaningful impact' on developer productivity – and 80% 'would be sad if they could no longer use it'
News Researchers at Microsoft wanted to demystify how AI is being used by software developers – their findings show the benefits are finally becoming clear.
-
Google's new Jules coding agent is free to use for anyone – and it just got a big update to prevent bad code output
News Jules came out of beta and launched publicly earlier this month, but it's already had a big update aimed at improving code quality and safety.
-
Using an older version of Python? You’re leaving ‘money and performance on the table’ if you don’t upgrade – and missing out on big developer efficiency gains
News New research from JetBrains shows a majority of enterprises are using a version of Python that’s a year or more older – and it's having a big impact on efficiency and performance.
-
Developers say AI can code better than most humans – but there's a catch
News A new survey suggests AI coding tools are catching up on human capabilities
-
84% of software developers are now using AI, but nearly half 'don't trust' the technology over accuracy concerns
News AI coding tools are delivering benefits for developers, but they’re still worried about security and compliance
-
Think AI coding tools are speeding up work? Think again – they’re actually slowing developers down
News AI coding tools may be hindering the work of experienced software developers, according to new research