Matt Pocock ๐๏ธ (@mattpocockukarrow-up-right) - June 14, 2022 at 7:21 PM
๐ฅ TypeScript Tip #24 ๐ฅ
Deriving vs Declaring is key to getting the most inference out of your types with as few lines of code as possible.
But sometimes, you want to ensure that some code conforms to a type without losing its literal values.
Enter satisfies()() ๐ pic.twitter.com/j8a9ahdesIarrow-up-right
https://user-images.githubusercontent.com/870029/206738005-1cda2b29-582e-4d87-b714-daad4383d7ef.mp4
Download mp4arrow-up-right
Tweet linkarrow-up-right
Last updated 2 years ago