Another way to index on window, without having to add a declaration, is to cast it to type any:
return (window as any)[className];
Another way to index on window, without having to add a declaration, is to cast it to type any:
return (window as any)[className];