author | handle | source | date |
---|---|---|---|
Matt Pocock 🏖️ |
@mattpocockuk |
2022-06-14 11:21:00 UTC |
Matt Pocock 🏖️ (@mattpocockuk) - 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/j8a9ahdesI