TypeScript Berlin Meetup #8 - Iván Ovejero - Distributive conditional types

preview_player
Показать описание
◭ In this talk, Iván will delve into distributive conditional types and what they are good for, as an example of how thinking of types in terms of sets can help us gain fluency in manipulating everyday types.

——————————————————

📚 Learn more about Prisma

——————————————————

💬 Connect with Prisma:

——————————————————

✅ Subscribe to Prisma's YouTube channel
Рекомендации по теме
Комментарии
Автор

I started playing with the example code shown at 5:45 and 6:19 and found it to be the opposite. Intellisense gives me access to all methods when using `Cat & Dog`, but only access to the shared `eat()` method when using `Cat | Dog`. Now I'm really confused. The presenter's logic makes perfect sense, but Typescript's compiler is telling me otherwise. Can someone please explain?

darksinge
Автор

using set-theory ideas for types is super helpful!

phoehtaung
Автор

wow, great talk! Give this man a medal!

Btw. ivov, did yiu ever try out haskells type system?

dayumnson
Автор

"combined" and "shared" would be better names for "unions" and "intersection" exactly how a database uses it.

heavierthanlight
Автор

Math is the fundamental of Computer Science not Data Structure and algorithm,

yassinebouchoucha
Автор

I find TypeScript design a bit flawed in this aspect. It is not what people expect from those operations and it makes trivial stuff non-trivial.

carloslfu