News for hackers. Stuff that matters.
Re:Simpler UI Logic With Finite State Machines by frankpf on Tuesday December 24, 2019 @11:24AM (#21873035)
Thankfully TypeScript's type system is powerful enough (and JS's syntax flexible enough) to decently simulate pattern matching:

https://gist.github.com/frankpf/cde7f792580f731dfe886ed2d91b... (see the second file for usage)

There are no comments on this comment yet.