No video

Mapped Types - Advanced TypeScript

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

Dmytro Danylov

Dmytro Danylov

Күн бұрын

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/...

Пікірлер: 40
@anuragrai5631
@anuragrai5631 3 ай бұрын
This is the one of the best explanations regarding advanced typescript concepts No one likes you explain this on KZfaq ever thanks a lot sir.
@mykyta-maria
@mykyta-maria 2 жыл бұрын
Чудове, послідовне пояснення!) Дякую!) Підписався на канал :)
@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 4 жыл бұрын
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..
@rostyslav5334
@rostyslav5334 2 жыл бұрын
Дуже корисні ТS серії, дякую!
@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
@TheAUa
@TheAUa 3 жыл бұрын
Nice and very good to understand. Finally I have the chance to get into TypeScript magic...
@98f5
@98f5 2 ай бұрын
I like your content. Good job
@YonathanBenitah
@YonathanBenitah 4 жыл бұрын
I like how you are teaching. Very clear... Thank you
@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 :)
@Rokovbabca
@Rokovbabca 2 жыл бұрын
Clean and easy to understand. Gj!
@markstone9112
@markstone9112 4 жыл бұрын
Чувак, ти крутий ❤
@DmytroDanylov
@DmytroDanylov 4 жыл бұрын
Дякую
@yuensc196
@yuensc196 2 жыл бұрын
great teaching
@dawid_dahl
@dawid_dahl 8 ай бұрын
Awesome, thank you! 🙏🏻
@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.
@maksym7279
@maksym7279 2 жыл бұрын
Дякую, Дмитре! В кінці (12:09), через посилання на 2 інші відео зовсім не видно що коїться на екрані.
@pragmaticivan
@pragmaticivan 3 жыл бұрын
Keep it up! Pretty good content! Thanks for taking the time to record those videos!
@borasumer
@borasumer 3 жыл бұрын
Thanks mate, excellent tutorial. Instantly subscribed.
@mehmatrix
@mehmatrix 3 жыл бұрын
Brilliant explanation. Subscribed :)
@fazex4185
@fazex4185 Жыл бұрын
Спасибо. Очень хорошо объяснили.
@SimonProductionsTM
@SimonProductionsTM 3 жыл бұрын
Thanks for the explanation. Great video overall :o.
@SuperQuwertz
@SuperQuwertz 2 жыл бұрын
Damn is this stuff useful. Great explanation!
@bstrnx
@bstrnx 3 жыл бұрын
I'm subscriber 1000!
@aram5642
@aram5642 7 ай бұрын
keyof any is now PropertyKey
@gerda-morozova
@gerda-morozova 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
@canmertinyo
@canmertinyo Жыл бұрын
thanks
@abdremo
@abdremo 3 жыл бұрын
excellent
@harshtiwari4545
@harshtiwari4545 2 жыл бұрын
Is there any way we can do reverse of it …?
@shensean1784
@shensean1784 3 жыл бұрын
thank u.
@mikhailkh8560
@mikhailkh8560 3 жыл бұрын
Like, share, subscribe! Awesome! Thanks for explanation!
TypeScript: Type Compatibility
42:17
Dmytro Danylov
Рет қаралды 6 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 13 МЛН
Glow Stick Secret Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 11 МЛН
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 22 МЛН
Utility Types - Advanced TypeScript
35:33
Dmytro Danylov
Рет қаралды 69 М.
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 203 М.
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 172 М.
Conditional Types - Advanced TypeScript
23:10
Dmytro Danylov
Рет қаралды 37 М.
TypeScript Wizardry: Recursive Template Literals
14:47
Tech Talks with Simon
Рет қаралды 37 М.
as const: the most underrated TypeScript feature
5:38
Matt Pocock
Рет қаралды 117 М.
TypeScript Interfaces vs Types
13:59
Harry Wolff
Рет қаралды 88 М.
Object Oriented vs Functional Programming with TypeScript
12:07
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 13 МЛН