17 ms·
That's just a matter of a specific language's syntax, type-checking, or linting. Pattern-matching in OCaml [0] will in most cases warn about non-exhaustive chec
by baddox 7y ago
That's just a matter of a specific language's syntax, type-checking, or linting. Pattern-matching in OCaml [0] will in most cases warn about non-exhaustive checks. It seems like TypeScript has something similar, although I haven't used it [1].
[0] https://www2.lib.uchicago.edu/keith/ocaml-class/pattern-matching.html#nonexhaustive https://www2.lib.uchicago.edu/keith/ocaml-class/pattern-matc...
[1] https://dev.to/babak/exhaustive-type-checking-with-typescript-4l3f https://dev.to/babak/exhaustive-type-checking-with-typescrip...