Settings

Theme

Mindfulness in TypeScript code branching, or how to if/else

monadical.com

6 points by Firfi a year ago · 2 comments

Reader

FirfiOP a year ago

Hey folks, sometimes on PRs, I find that people aren't well-versed in the intricacies of code branching. So, I wrote a short article to educate fellow engineers and point to it sometimes so I don't have to explain things over and over.

Specifically, many people apparently don't know yet about exhaustiveness and the statement/expression dichotomy and how TS type system can help with it.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection