Loading video...
Video Failed to Load
🔥 Here's what the new TypeScript 4.9 `Satisfies` Operator is for
75,884 views • 3 years ago •via X (Twitter)
10 Comments

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

this is a great example

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

This is amazing!

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

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

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

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?

Helpful, thanks!

@_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
Related Videos
They Don’t Call Him The Smooth Operator For Nothing 🔥🔥
Shawn K The King
1,048,120 views • 1 year ago


