I'm using webpack to compile my TypeScript to Javascript and I want to expose a variable to the global scope so others can access it.
I know how to do the following in TypeScript
window["MyVariable"] = 'Hello';
and read it in JavaScript like that
console.log(window.MyVariable);
But I'd prefer if I could just have it in the global scope like that.
console.log(MyVariable);
Is this possible?
Best regards, Nick