I created a variable in a .ts file that has no module or class. It mostly looks just like a plain JavaScript file. I want this variable to accessible in another .ts file inside of a class that is inside of a variable.
So for example I have:
foo.ts
var foo = "some stuff";
bar.ts
module Bar {
export class BarClass {
function getFoo() {
return foo;
}
}
}
I'm not sure this is the best way to do it. I've tried using the window.bar global but that doesn't seem to work. I'm new to TypeScript jumping into a larger codebase so please let me know if you need any further clarification on anything.
Thanks!