DEV Community

Discussion on: Managing Key-Value Constants in TypeScript

Collapse
 
briancodes profile image
Brian • Edited

Object.keys(colorLabels) keeps the order that the keys were added to the object. The object can't be edited after it's created as you've used const ... as const, so I think it's safe