Тёмный
No video :(

Writing Type-Level programs in TypeScript | Talks at DeepSource 

DeepSource
Подписаться 720
Просмотров 1,5 тыс.
50% 1

TypeScript's type system is more powerful than is let on by everyday use. Following the release of 4.9 - it's become more than just "JS with types". In this talk, Srijan from the DeepSource Language Engineering team covers a niche that explores writing programs entirely with types.
Code used in the talk: github.com/sri...
Follow Srijan Paul on Twitter: / _injuly
Follow @DeepSourceHQ on Twitter: / deepsourcehq
----------------------------------------------------------------------------------------------------------------------
Welcome to the official DeepSource RU-vid channel. Here you’ll find news about our product launches, the Sourcerers, and the wonderful world of open-source. We at DeepSource are dedicated to helping you ship good code.
deepsource.io

Опубликовано:

 

5 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@morgard211
@morgard211 26 дней назад
Great talk!
@darrinmc
@darrinmc 2 месяца назад
The examples in your talk were fantastic. They cleared up a lot of confusion I had around how some of the type system features worked. Excellent work!
@srijanpaul
@srijanpaul 2 месяца назад
Thank you! I'm glad you liked it.
@texoport
@texoport Год назад
I spent 4 hours on this 30 minute video but left with a vastly better understanding of type-level ts. Excellent talk :)
@DeepSourceHQ
@DeepSourceHQ Год назад
Thank you! We're glad you enjoyed the talk.
@debanwitamahato65
@debanwitamahato65 Год назад
🤯
@orrepstein1261
@orrepstein1261 7 месяцев назад
This was super cool, but I'm curious, how would you represent negative numbers for your arithmetic types?
@srijanpaul
@srijanpaul 7 месяцев назад
Hi, glad you liked it. You would have to use a different encoding to represent negative numbers, but it is certainly possible. For instance, you can use a tuple type where the first item is a flag that indicates if the number is negative, and the second item is the cardinal value of that number. Or: you can use two's complement representation. It's similar to what you would in a turing machine.
@kerolossamir5181
@kerolossamir5181 Год назад
This is brilliant ... but I just want to ask, how to use the type level in real code .. how can use add type .. will it be a function that Add and use these types or what .. the big picture is not clear in real-world coding
@srijanpaul
@srijanpaul 7 месяцев назад
Hey there! Glad you enjoyed the talk. There is barely any use for type-level number systems, but this level of type hackery is helpful when you want to enforce invariants in code. Look at projects like Zod, and Elysia JS, for example. They do a lot of type-level TS to enforce invariants.
Далее
Triple Protein Sandwich
00:32
Просмотров 3,9 млн
TypeScript Wizardry: Recursive Template Literals
14:47
Enums considered harmful
9:23
Просмотров 204 тыс.
I Cannot Believe TypeScript Recommends You Do This!
7:45
Type Level Programming in TypeScript
32:52
Просмотров 5 тыс.