Typescript Just Got a Big Update

Manpreet Singh
2 min readAug 26, 2022

Welcome back! Typescript is an awesome programming language with a ton of capability, if you’re new to Typescript, check out the link below to learn more about it:

The next version of Typescript just ended up coming out, Typescript 4.8! Here’s a link to their release log:

Let’s take a look at some of the changes with this update!

Improved Inferences

This new update adds new ways to add extends and infers type variables!

// Grabs the first element of a tuple if it's assignable to 'number',
// and returns 'never' if it can't find one.
type TryGetNumberIfFirst<T> =
T extends [infer U extends number, ...unknown[]] ? U : never;

Improved Intersection Reduction

--

--

Manpreet Singh
Manpreet Singh

No responses yet