👩💻 Join our community of thousands of amazing developers!
We have a TypeScript package that uses and exports [1] this enum: export const enum AudioFormat { STEREO, SURROUND_5_1, SURROUND_7_1, ATMOS, } And we’d like to make available to consumers of our package an array containing all the values of this enum. We could do the following: export const ALL_AUDIO_FORMATS = Object.values(AudioFormat); But this has several problems. The first one is that it doesn’t actually work. Since we’re using a const enum (instead of a regular enum) we g...