Hacker News new | ask | show | jobs
by tengbretson 1202 days ago
Regarding your last point, I think the general consensus in TypeScript is to avoid using enums entirely.
1 comments

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
    }