TypeScript Opaque Types // Nominal vs Structural Typing (Advanced TypeScript)

TypeScript Opaque Types // Nominal vs Structural Typing (Advanced TypeScript)

basarat

2 года назад

3,801 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Boian Ivanov
Boian Ivanov - 23.03.2023 11:54

Or you can pass in an object with both entries as part of it and then destructure it accordingly to use in your function. This way you don’t need to have such a hacks approach of additional methods, nor strange types. Interesting video though

Ответить
Yegor Zakharov
Yegor Zakharov - 05.03.2023 20:24

Ugh, that's disgusting. Whyyy do duck typing. Good fix though, thanks.

Ответить
Eri
Eri - 07.02.2023 11:35

This is gold :)

Ответить
Sisir Adhikari
Sisir Adhikari - 29.01.2023 09:08

Learning a lot! Thank you for your informative videos!

Ответить
Tushar Khairnar
Tushar Khairnar - 16.12.2022 07:18

Great solution to daily programming problems. Thanks! :)

Ответить
Luxcium
Luxcium - 22.10.2022 09:31

😅 He is talented and he is smart but with this hoodie he is just making me melt 🫠🥰 ✨

Ответить
Dennis Gonzales
Dennis Gonzales - 27.08.2022 07:21

thanks!

Ответить
vzR Tz
vzR Tz - 28.07.2022 16:23

who needs opaque types in a normal app? just asking cause i have no idea how this is useful other than it being food for thought;

Ответить
Benji Daniel
Benji Daniel - 30.06.2022 06:23

I really wish TS would make opaque types a 1st class feature (like Flow does). Workarounds like this are okay, but not the prettiest.

Ответить
noccer
noccer - 28.06.2022 05:33

Brilliant! ☘️

But also - you might need to fire the Script Supervisor on your film set - where did your Fila jumper disappear to at the end of the video? 😜

Thanks Bas 👍

Ответить
Cyrus Gracias
Cyrus Gracias - 27.06.2022 17:35

Amazing, I thought the issue was that now we can pass negative number, NaN, Infinity to those number types

Ответить
akhil j
akhil j - 27.06.2022 17:19

Quite informative. Well explained too. Thanks a lot.

Ответить