3 ms·
can you name some use-case it actually would greaty simplify as you say? Because neither TFA nor this thread has yet proposed anything that isnt better served
by baobun 2y ago
can you name some use-case it actually would greaty simplify as you say?
Because neither TFA nor this thread has yet proposed anything that isnt better served by later introduced (say TS 3~4.x+) language features or even external libraries if you actually do want to use them for their generated runtime library (enums) and not just their type-aspects.
I have only seen them complicate things.
You could use it to make typescript prevent forking and code-duplication within a codebase of engineers you dont trust, I guess. But it doesn't seem like a great use either.
Consider https://news.ycombinator.com/item?id=42772924 https://news.ycombinator.com/item?id=42772924
- WorldMaker 2y ago> You could use it to make typescript prevent forking and code-duplication within a codebase of engineers you dont trust, I guess. But it doesn't seem like a great use either. Right, for that you are better off using unique Symbols. That's definitely the modern JS way to nominally type something in a private way that stays inside your API boundary and is very much more useful because it is also enforced at runtime, too, and not just an accident of old type mechanics.