Re:An introduction to type programming in TypeScript
by wruza on Wednesday February 02, 2022 @07:35AM
(#30176651)
“Bare” enums are not better either. No introspection, bad debug-ability (you can’t print them in a human-readable way). Typescript enums are a good tradeoff between just string|string|… types and pure integers (or whatever type you assign to them). The former’s literals are indistinguishable from string literals at readsourcestime. The latter creates issues at debugtime.
[ Parent
| on HN ]
There are no comments on this comment yet.