I'm trying to call a method in another .js file that looks like this:
if (typeof Shared === "undefined" || !Shared) {
var Shared = {};
}
Shared.HelperClass = (function ()
{
// ... private stuff here
return {
Init: function()
{
},
TestMethod: function(name)
{
return name;
}
};
})();
Naturally to call init in Javascript, i'd call:
Shared.HelperClass.Init();
Now I have a TypeScript file i'd like to call this in, but it throws a compiler error because it doesn't know what it is.
How do I tell TypeScript about these methods such that I can call this code from my .ts file?