Satisfies doesn’t “widen the type”. It doesn’t change the type in any way. It simply validates that the type of the expression is assignable to the one you provide.
Thanks man! I am glad that you got something out of the video. Yes, I do have a short on unknown: ruclips.net/user/shorts8NfPR2NsgtA Main Takeaway: Any -> can be any type, but turns off type-checking Unknown can be any type, but does NOT turn off type-checking. This is also a good follow-up video to see the difference in action: ruclips.net/user/shortsNom_q7Mpr2g Hope it helps! 😎👍
Satisfies doesn’t “widen the type”. It doesn’t change the type in any way.
It simply validates that the type of the expression is assignable to the one you provide.
You are right! I think my error here was my teaching approach of blending the example into the syntax.
Nicely explained man, that made a lot of sense. Now, I wonder if you have a video that shows me where I’m going wrong with the `unknown` type…
Thanks man! I am glad that you got something out of the video.
Yes, I do have a short on unknown:
ruclips.net/user/shorts8NfPR2NsgtA
Main Takeaway:
Any -> can be any type, but turns off type-checking
Unknown can be any type, but does NOT turn off type-checking.
This is also a good follow-up video to see the difference in action:
ruclips.net/user/shortsNom_q7Mpr2g
Hope it helps! 😎👍