Member-only story
Typescript Just Got a Another Big Update
2 min readJun 24, 2022
Welcome back! Typescript is an awesome programming language, if you’re new to this language, check out the link below to learn more about it:
Typescript just ended up getting another big update, this is the beta of Typescript 4.8, if you want to check out their entire release log, here is a link to it:
So, let’s take a look at some of the updates with this version of Typescript!
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;