Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

🔥 Here's what the new TypeScript 4.9 `Satisfies` Operator is for

75,884 görüntüleme • 3 yıl önce •via X (Twitter)

10 Yorum

Rachel Leggett profil fotoğrafı
Rachel Leggett3 yıl önce

Oooo interesting, I feel like this is the kind of thing I'll rarely need but it'll be a huge help the one time I need it

hillarious clinton profil fotoğrafı
hillarious clinton3 yıl önce

this is a great example

Evan! profil fotoğrafı
Evan!3 yıl önce

Seems similar to protocols in Swift where you can specify that a generic type must conform to some protocol using ‘where generic: protocol’

Ryan profil fotoğrafı
Ryan3 yıl önce

This is amazing!

Blessing Adesiji profil fotoğrafı
Blessing Adesiji3 yıl önce

Really nice video! But how do edit this video to show up like this?

A void profil fotoğrafı
A void3 yıl önce

The beauty of wes bos tutorial is he always uses the latest method to check the other latest method. Love your way of teaching

N J O N J O profil fotoğrafı
N J O N J O3 yıl önce

So now we are just going to ignore "as".

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

as will assert it into a type - you are telling typescript it's a type. satisfies will *ask* typescript if it satisfies the requirement - and typescript will tell you if it trust. as = trust me bro satisfies = could it be?

Nick Rempel profil fotoğrafı
Nick Rempel3 yıl önce

Helpful, thanks!

Wes Bos profil fotoğrafı
Wes Bos3 yıl önce

@_he110w0r1d I don't have any rules on it yet, but I can't see where you could abuse it - its helpful to cut down on type narrowing. We will see as I use it more

Benzer Videolar