Mapped Types in TypeScript

preview_player
Показать описание
How well do you know unions in TypeScript? Join me in this episode to discover everything you need to know about unions in TypeScript. We will talk about what a union really is, the syntax, and under which circumstances it could be useful. I will show you how to use literal types to create more advanced definitions for your types. We will learn the concept of discriminated unions, and I will show some practical examples to get the most out of them.

Read the article with the coding examples:

Contents
00:00 Intro
02:18 Creating a mapped type
03:30 How to use mapped types?
06:16 Generic mapped types

Check out my ✨TypeScript course:

Links
- The playlist with all the videos in the series:
- Fun with TypeScript Unions:

This video belongs to my series Too Long To Read TypeScript. Every episode covers in detail a core concept of the language.

❤️ How to support this channel?
- Like this video
- Subscribe to the channel
- Share this video with your friends on social media (only if it helped you)
Рекомендации по теме
Комментарии
Автор

Искал информацию про Mapped Types, я хоть и русский, но с большим удовольствием слушал речь на английском. Браво, просто великолепное и понятное произношение, мне человеку со слабым английским на слух, было всё понятно!) Спасибо!)

mikeyfront
Автор

At 6:56 i think you meant to put Readonly2 on line 5 instead of Readonly. I love this series btw I get to learn a lot!

MrZiyak
Автор

can we loop through the values e.g 1st key has string type, 2nd shall have number , here in this example, all keys have same type .. can you help ?

usamaimran