mattpocockuk - 1512388535692652547
Last updated
Last updated
Matt Pocock (@mattpocockuk) - April 8, 2022 at 7:15 PM
🔥 TypeScript Tip #18 🔥
You can do some really, really neat stuff with assertion functions inside classes.
Here, we assert that the user is logged in and get proper inference on the user's logged in user id. pic.twitter.com/4XmfKsrsTe
https://user-images.githubusercontent.com/870029/206737808-497086e7-aa9b-4b9d-bb42-af6a56671c33.mp4