Remix.run Logo
sheept 5 hours ago

dictionaries generally aren't guaranteed to contain an entry for every possible value of the key type. while you could implement the colors example with a dictionary, ideally you'd want the type system to assure that given a Color, there will be a string associated with it

vips7L 5 hours ago | parent [-]

Sounds like enums with extra steps.

socalgal2 an hour ago | parent | next [-]

it’s Enuma associated with data without having to repeat yourself

If you have to define the Enums in one place and then repeat them all in another just to associate data with each one you’ve failed

epolanski 3 hours ago | parent | prev [-]

Enums aren't type safe in typescript