What is Nostr?
Axel Rauschmayer /
npub17at…75qq
2025-01-17 15:36:14

Axel Rauschmayer on Nostr: #TypeScript: I’m writing a blog post about enums and alternatives. As it turns out, ...

#TypeScript: I’m writing a blog post about enums and alternatives. As it turns out, my previous thinking was too complicated. Things become relatively simple if you consider 3 use cases:

1. Namespace for constants with primitive values
2. Custom type with unique values
3. Namespace for constants with object values

Per use case, these are desirable features:

* Exhaustiveness checks
* Members can be enumerated
Author Public Key
npub17at4s5zn2gryfckwn6xpmwuaejhdksd93nk8rtzwjsjhcm8pu54s8875qq