Julian @fettstorch.dev · Nov 21

The first insight is that we can interrupt foo via the 'retry' function as the retry function throws. This is the only way how a nested function can preempt the calling function I think. While I wouldn't recommend abusing exceptions as a messaging/event system erm... we goofin 🤪🤙🏻

0 likes 1 replies

?

Replies

Julian · Nov 21

And I learned that typescript is actually smart enough to determine code as unreachable if it follows a function call that returns never e.g.: