StackBlitz (@stackblitzarrow-up-right) - November 16, 2020 at 11:03 PM
💡 TypeScript tip (6):
If your function/class will work with multiple types but they need to meet some minimal criteria, you can specify the minimal shape a generic must have by extending it:
<T extends MyBaseType> pic.twitter.com/F74tddnmdUarrow-up-right
<T extends MyBaseType>
https://user-images.githubusercontent.com/870029/208133765-cdc499ec-1783-49bc-8bd3-82d4bb37f8ef.mp4
Download mp4arrow-up-right
Tweet linkarrow-up-right
Thread by @stackblitz on Threadify Reader Apparrow-up-right
Last updated 3 years ago