Learn the power of typescript generics #shorts

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Honestly I’d been struggling to understand how exactly Typescript generics worked, this helped a bunch!
Thanks Cody!

jasondx
Автор

Believe me, I'm using typescript from the last 2 years and watched 100s of videos on it. But no one explained it so well and understandable with a very very good example. Keep up the good work 👍 #respect

simransingh
Автор

Generics for me is somethjng i understand when someone else is showong me, but draw a blank when i need to use it myaelf

omomer
Автор

Why not do withValidation(entity: Entity ) ?

_danisson
Автор

My tip for understanding generics is to just build something with it, like you did here. Then it all clicks easily.

codinginflow
Автор

Can you move the code up. The UI overlays on the short is covering up half your code

invinciblemode
Автор

or giving as Entity to the end of the assignment such as withValidation(myObj) as Entity ? i think this would has same result or no ?

ghalitsar
Автор

This concept of reified structural types is interesting. Implied structure is however in my opinion hard to read.

EsotericArnold
Автор

Dude give us typescript full tutorial on advance classes in YouTube

NaveenvigneshKumar
Автор

Traditionally, it should be T instead of E

gfriwjh
Автор

It was difficult to see the bottom code because of the overlay text on YouTube shorts. Could you please account for that in next shorts :) maybe put code at the top and you at the bottom 😅

pauldudley
Автор

I don't really understand. Why aren't you extending Entity to a new type EntityWithValidation?

mutatedllama
Автор

Is your mic omni directional? Or cardioid and you intentionally placed it like that to diminish the S and P sounds? Just wondering...

Jonathan-cybw
Автор

how to you edit potrait video? trying to do one also

farhanhelmycode
Автор

Although this is valid typescript, that spread operator is concerning to me. Think about a case that your api receives thousands of requests and you do this thing on each request. You'd be copying the original object and allocate a new one. what happens to the old one is to become a garbage. You'd be creating a huge amount of garbage just because you think this is convenient. You'll get a terrible performance for nothing.

gordonfreimann