Hey Andrew, thanks for another great video, I have learned so much from your channel over the past 5-6 months. I just have a quick question. The T extends T syntax (at 06:18) always confused me a little bit. I understand what it achieves here (for example you can perform a check or a modification for each member of the union), but are there any other practical use cases where you would use T extends T (to start distribution) or is that only/mostly good when working with string literal unions (or other primitive union types). Basically I'm just asking if it's useful for other things. Cheers!
Thanks for watching! It's mainly useful for distribution, but not just with primitive union types. Check out my recent video about this: th-cam.com/video/JyUwtRuMKUk/w-d-xo.html
@@andrew-burgess I've actually watched that video, but it didn't really "click" for me yet (yes I know, not the sharpest tool in the shed haha). Now that I've seen both I get a much clearer picture, thank you very much! One of the harder things about TypeScript at least from a personal experience is not just knowing about a certain technique but when and how to use it, and/or picking up good habits such as demonstrated in your videos. For that you need a good example and a little bit of practice. Cheers again!
10 years working with JS, I absolutely hate TS. Trying to learn it and it just feels gross. 3.5 minutes into this video and already no idea wtf is going on. Declare? keyof?
@@andrew-burgess because it makes me question whether I really even know TS or not, because after watching your videos one thing I know for sure is I only touched the tip of the iceberg. this is a good thing btw, your doing a great job
❤ from Kysely.
Awesome video and a great way to demo actual generics outside of some of the very esoteric typescript challenges!
Andrew I love your videos mate. Such a humble approach. You’d be a great tech lead / principal to work with.
a master at work
one of your best, so nice to see you think.
Here I was thinking I knew Typescript... 😅
Great video Andrew.
this is cool, i have always struggled with typescript generics and got lost as soon as you hit 4:23. Any tips?
Start doing the typescript challenges! By far the best way to get your hands dirty and progress quickly!
This is exactly right!
Definitely not the beginner way to learn TypeScript, but pretty cool nonetheless.
For sure! But I think a lot of us know the basics, but want to keep learning past that plateau.
Thanks for this, pleas give us more advanced typescript💯
Hey Andrew, thanks for another great video, I have learned so much from your channel over the past 5-6 months. I just have a quick question.
The T extends T syntax (at 06:18) always confused me a little bit. I understand what it achieves here (for example you can perform a check or a modification for each member of the union), but are there any other practical use cases where you would use T extends T (to start distribution) or is that only/mostly good when working with string literal unions (or other primitive union types).
Basically I'm just asking if it's useful for other things.
Cheers!
Thanks for watching!
It's mainly useful for distribution, but not just with primitive union types. Check out my recent video about this:
th-cam.com/video/JyUwtRuMKUk/w-d-xo.html
@@andrew-burgess I've actually watched that video, but it didn't really "click" for me yet (yes I know, not the sharpest tool in the shed haha). Now that I've seen both I get a much clearer picture, thank you very much!
One of the harder things about TypeScript at least from a personal experience is not just knowing about a certain technique but when and how to use it, and/or picking up good habits such as demonstrated in your videos. For that you need a good example and a little bit of practice.
Cheers again!
Great content.
Can I have those typescript challenges links that you mentioned at the end ?
Awesome video! And great exercise 👨🏻💻
the only take away from this is TS Generics are more powerful than my thought
Yo man, this is awesome
me coming from searching kysely: wow 😅
10 years working with JS, I absolutely hate TS. Trying to learn it and it just feels gross. 3.5 minutes into this video and already no idea wtf is going on. Declare? keyof?
太强了!
i genuinely get scared when i see this kind of ts videos
Why is that?
@@andrew-burgess because it makes me question whether I really even know TS or not, because after watching your videos one thing I know for sure is I only touched the tip of the iceberg. this is a good thing btw, your doing a great job
TS is dying
Really? What's taking its place?