News for hackers. Stuff that matters.
Re:Building a hybrid native application with Gleam and Tauri by dcre on Monday February 19, 2024 @08:18PM (#39436928)
Yeah, that can be annoying. Until pattern matching makes it into JS, the main way people deal with this is to use a library. For example, ts-pattern lets you stick `.exhaustive()` at the end of a match call and I believe you get the error at typechecking time, not runtime.

https://github.com/gvergnaud/ts-pattern

There are no comments on this comment yet.