TypeScript Mapped types explained

  Рет қаралды 2,227

nivek

nivek

Күн бұрын

Mapped types are a great way of transforming existing types into new types. In this video tutorial, you will learn how to create mapped types and how to leverage mapped types in your project to transform read-only interfaces into interfaces with optional properties or even how to transform a simple interface into a type that defines getters.
TypeScript keyof explained:
• Typescript's keyof exp...

Пікірлер: 10
@v23452
@v23452 20 күн бұрын
I was impressed by the capitalization trick in the end - I think, it requires more attention with more explanation and examples. PS Please get a decent microphone as it will increase your audience. Hope to see more tricks from you!
@zshn
@zshn 3 жыл бұрын
Thanks for sharing. P.S. Intro music too loud and sudden.
@AlainBoudard
@AlainBoudard 3 жыл бұрын
Excellent techniques ! Thanks for sharing.
@KrisMeister
@KrisMeister 3 жыл бұрын
How did you first example work when the there was typo in `Proeperty`? This technique looks very convenient?
@shemmuthanga6352
@shemmuthanga6352 3 жыл бұрын
It is just a variable name, not a keyword. If in the second example, he used 'Proeperty' and 'Property', it would throw an error
@zshn
@zshn 3 жыл бұрын
I get that this is somewhat advanced usage. But where do we draw the line between readability and flexibility? 6:30 is great but certainly very complex from a readability standpoint.
@robertklinger2883
@robertklinger2883 2 жыл бұрын
This feels awesome, but I cant really explain why. Can someone explain some real use-cases where classes would not be the better choice?
@peterjordanson4201
@peterjordanson4201 3 жыл бұрын
Hi, just a constructive feedback here: your intro is too loud. Either remove the intro or lower the volume by a lot. Thanks for the video. Cheers
@vredurs
@vredurs 2 жыл бұрын
Cool but in terms of readability and maintainability, I don’t think it adds value
@limerickgangster
@limerickgangster 2 жыл бұрын
But it would be 100 times better if you would use it on some code.
Typescript's keyof explained
3:58
nivek
Рет қаралды 2,4 М.
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 184 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
УДИВИЛ ВСЕХ СВОИМ УХОДОМ!😳 #shorts
00:49
Union Types in TS
14:49
Hitesh Choudhary
Рет қаралды 15 М.
Why use Type and not Interface in TypeScript
14:12
ByteGrad
Рет қаралды 215 М.
4 ways to use the TypeScript infer keyword
10:08
Andrew Burgess
Рет қаралды 13 М.
Learn TypeScript Generics In 13 Minutes
12:52
Web Dev Simplified
Рет қаралды 285 М.
TypeScript Template Literal Types
19:11
Harry Wolff
Рет қаралды 6 М.
No BS TS #14 - Mapped Types in Typescript
9:33
Jack Herrington
Рет қаралды 22 М.
Mapped Types - Advanced TypeScript
12:16
Dmytro Danylov
Рет қаралды 43 М.
Angular Signals - The future of Angular
55:11
nivek
Рет қаралды 1,6 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39