Mapped Types - Advanced TypeScript

  Рет қаралды 42,129

Dmytro Danylov

Dmytro Danylov

4 жыл бұрын

In this video I'll explain how to create and use Mapped Types in TypeScript.
00:28 A simple example
02:59 Create a new type based on an existing object type literal (using keyof to get properties of a type)
05:14 Recreating the Pick type
07:19 Explaining how mapped type is used by Record type
09:05 Difference between an interface with an index signature and the Record type
11:12 How to add a specific property to a mapped type?
👨‍💻 My Udemy Course:
Using TypeScript with React
www.udemy.com/course/react-wi...

Пікірлер: 39
@anuragrai5631
@anuragrai5631 28 күн бұрын
This is the one of the best explanations regarding advanced typescript concepts No one likes you explain this on KZbin ever thanks a lot sir.
@samelie
@samelie 4 жыл бұрын
Thank you for these! Great teacher and hacker! Understanding the composability of Typescript is key to writing less of it
@renisoncrawford9611
@renisoncrawford9611 2 жыл бұрын
Wow! Speechless... Your tutorial is a work of art that is crafted to perfection. Thank you for taking the time and sharing your talent with the world.
@vaylinne6093
@vaylinne6093 3 жыл бұрын
Being pointed to useful typing declarations sure saves a lot of time compared to digging through the entire Typescript documentation, thanks :3
@inaccessiblecardinal9352
@inaccessiblecardinal9352 3 жыл бұрын
Excellent work. Ran into Records for exactly the limitation of [key: ?]. I don't have a lot of use cases for the generality of keys, so I worked around it and forgot that it bugged me! Thanks for the deeper dive.
@imsarvesh_
@imsarvesh_ 3 жыл бұрын
Man your videos are on another level. Fews videos on this channel are so advance, that I need to watch several times..
@pragmaticivan
@pragmaticivan 3 жыл бұрын
Keep it up! Pretty good content! Thanks for taking the time to record those videos!
@YonathanBenitah
@YonathanBenitah 3 жыл бұрын
I like how you are teaching. Very clear... Thank you
@TheAUa
@TheAUa 3 жыл бұрын
Nice and very good to understand. Finally I have the chance to get into TypeScript magic...
@shahid13384
@shahid13384 3 жыл бұрын
You are very clear in your thoughts and so as conveying it to others. Great content with easy explanation. Thank you!
@DmytroDanylov
@DmytroDanylov 3 жыл бұрын
Thank you
@Rokovbabca
@Rokovbabca 2 жыл бұрын
Clean and easy to understand. Gj!
@SimonProductionsTM
@SimonProductionsTM 3 жыл бұрын
Thanks for the explanation. Great video overall :o.
@borasumer
@borasumer 3 жыл бұрын
Thanks mate, excellent tutorial. Instantly subscribed.
@dawid_dahl
@dawid_dahl 5 ай бұрын
Awesome, thank you! 🙏🏻
@mykyta-maria
@mykyta-maria Жыл бұрын
Чудове, послідовне пояснення!) Дякую!) Підписався на канал :)
@mehmatrix
@mehmatrix 3 жыл бұрын
Brilliant explanation. Subscribed :)
@yuensc196
@yuensc196 2 жыл бұрын
great teaching
@andreicristea997
@andreicristea997 3 жыл бұрын
Thank you Dimitrii. Only now I had on a project @ts-ignore statement and could overcome it with your Mapping Types Solution. Really it made the code look so nice and persistent now. Awesome!
@DmytroDanylov
@DmytroDanylov 3 жыл бұрын
Thank you too Andrei for sharing your experience and letting me know that my tutorial was useful :)
@fazex4185
@fazex4185 Жыл бұрын
Спасибо. Очень хорошо объяснили.
@rostyslav5334
@rostyslav5334 Жыл бұрын
Дуже корисні ТS серії, дякую!
@casual_sky2
@casual_sky2 3 жыл бұрын
Thank you for making this! I've learned so much. Can you please do a deep dive into Generics? What you can and can't do with them, interfaces with generic member functions and such? I'm really struggling getting things to work and I can't find videos going deep into them.
@DmytroDanylov
@DmytroDanylov 3 жыл бұрын
Thank you for your feedback! I’m not sure if I’ll make a video about generics soon. Though, generics is one of the topics that I might cover in the future.
@bstrnx
@bstrnx 3 жыл бұрын
I'm subscriber 1000!
@abdremo
@abdremo 3 жыл бұрын
excellent
@shensean1784
@shensean1784 3 жыл бұрын
thank u.
@markstone9112
@markstone9112 3 жыл бұрын
Чувак, ти крутий ❤
@DmytroDanylov
@DmytroDanylov 3 жыл бұрын
Дякую
@SuperQuwertz
@SuperQuwertz 2 жыл бұрын
Damn is this stuff useful. Great explanation!
@canmertinyo
@canmertinyo Жыл бұрын
thanks
@maksym7279
@maksym7279 Жыл бұрын
Дякую, Дмитре! В кінці (12:09), через посилання на 2 інші відео зовсім не видно що коїться на екрані.
@harshtiwari4545
@harshtiwari4545 2 жыл бұрын
Is there any way we can do reverse of it …?
@aram5642
@aram5642 4 ай бұрын
keyof any is now PropertyKey
@mikhailkh8560
@mikhailkh8560 3 жыл бұрын
Like, share, subscribe! Awesome! Thanks for explanation!
@user-ue8bh7tj5k
@user-ue8bh7tj5k 2 жыл бұрын
Mapped Types - это всё ещё самая непонятная для меня тема. Я просто не понимаю как начать думать конвенцией Typescript, чтобы также жонглировать дженериками. Вот например даже на видео есть запись вида , но какие ключи могут быть у "any"? "Any" может же быть чем угодно, хоть числом, у числа нет ключей, но typescript почему то не ругается. Всё это только сбивает и сеет смуту в мою голову. Или вот ещё пример. На видео 7:03 мы говорим, что "a" - это keyof "T", но "T" имеет в себе ещё и "b". Почему Typescript не ругается на отсутствие "b" - мне тоже неведомо. И в процессе я наблюдаю кучу таких вот вещей и нюансов. Надеюсь когда-нибудь я осознаю дух машины Тайпскрипта и посмотрю с недоразумением на прошлую версию самого себя.
@dixztube
@dixztube Жыл бұрын
Great job covering this ! Man i hope your safe its beyond inhuman what those maniacs in russia are doing i feel a sort of kinship with fellow developers and share the passion and investment that comes with sucha wonderful field - it makes me sick what is happening to all people of invaded lands. As an American i just can't comprehend it
TypeScript: Type Compatibility
42:17
Dmytro Danylov
Рет қаралды 6 М.
PINK STEERING STEERING CAR
00:31
Levsob
Рет қаралды 22 МЛН
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 2,9 МЛН
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН
Utility Types - Advanced TypeScript
35:33
Dmytro Danylov
Рет қаралды 68 М.
TypeScript Wizardry: Recursive Template Literals
14:47
Tech Talks with Simon
Рет қаралды 36 М.
Conditional Types - Advanced TypeScript
23:10
Dmytro Danylov
Рет қаралды 36 М.
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 194 М.
TypeScript Utility Types You Must Learn
14:07
TomDoesTech
Рет қаралды 16 М.
One To Three USB Convert
0:42
Edit Zone 1.8M views
Рет қаралды 441 М.
WWDC 2024 - June 10 | Apple
1:43:37
Apple
Рет қаралды 10 МЛН