"Making impossible states impossible" is an idea on how to tame code complexity by making invalid application states not representable on type level. Fewer variations of the state you have, less thinking must be done around them and fewer bugs appear in your program. This idea is more known in some functional programming languages with more advanced type systems, but it's totally doable in typescript with the help of discriminated unions. This talk will be in two parts - at first, I will give the basics of typescript unions and how they work. In the second part, I will present some real code examples of how this technique might make your code simpler.
-
Notifications
You must be signed in to change notification settings - Fork 0
dragonofdeath/impossible-states
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Slides for presentation
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published