It would be nice if const assertions were applied to the value maps. We need not widen the literal types on these to obtain literal value, for example:
I tend to reach for these exports rather frequently. Composing additional types from the maps is rather extraneous without assertion. A more elegant approach could be exporting these as const enums because they are removed during compilation but this may result in some refactors across the codebase and in addition require exposure to raw .ts files in the distributed bundle.
Hey @vrimar
Hope all is well.
It would be nice if const assertions were applied to the value maps. We need not widen the literal types on these to obtain literal value, for example:
I tend to reach for these exports rather frequently. Composing additional types from the maps is rather extraneous without assertion. A more elegant approach could be exporting these as const enums because they are removed during compilation but this may result in some refactors across the codebase and in addition require exposure to raw
.ts
files in the distributed bundle.