window.foo = 'name'
class Foo {
static [window.foo]() {}
}
console.log(Foo.name)
esbuild try
The input code outputs ƒ [window.foo]() {}. On the other hand, the output code outputs Foo.
(Note: this is not what I encountered in a real world usage. I found it when trying to know how keepNames feature works in esbuild.)