Re:All JavaScript and TypeScript features of the last 3 year...
by tengbretson on Thursday March 09, 2023 @12:55PM
(#35084305)
Regarding your last point, I think the general consensus in TypeScript is to avoid using enums entirely.
[ Parent
| on HN ]
Re:All JavaScript and TypeScript features of the last 3 year...
by itslennysfault on Friday March 10, 2023 @11:18AM
(#35096391)
What about union string types?
I'd really like to be able to just do...
type UserType = 'default' | 'admin' | 'manager';
interface UserTypeCounts {
[key: UserType]: number
}