Object.values on an enum with template literal values #3329
Closed
Description
Repro: https://github.com/Hacksore/test-ts-objects-literals
This only happens with esbuild
and when you use template literal values.
I can't repro on tsplayground
repro code
const staticMember = "static";
enum TemplateLiteral {
Minecraft = `minecraft_${staticMember}`,
Lol = `lol_${staticMember}`,
}
console.log(Object.values(TemplateLiteral);
expected
[ 'minecraft_static', 'lol_static' ]
actual
[ 'minecraft_static', 'Minecraft', 'lol_static', 'Lol' ]
Metadata
Assignees
Labels
No labels