The title says it all. The only thing I can find is that global variables are stored under window but that doesn't seem to be true for classes defined using the class keyword.
class Foo {
constructor() {
console.log('A Foo is created');
}
}
const foo = new Foo();
const bar = new window['Foo'](); // TypeError: window.Foo is not a constructor
I know one can write something like let Foo = class Foo {}
but I would like to keep the redundancy low. Also, I'm interested if a true, non-work-around solution exists just out of curiosity.