I've got a good grasp of TypeScript and use it often so I know how to do most things.
Assume I have a function attached the global, for example getThisOrThat() is the event. This function is attached to global but it's also part of a module that's in the project's node_modules. It has perfect typings to work with but since the module doesn't export functions directly (remember they're attached to global).
So now I can't do import { getThisOrThat } from 'the-module'; because the transpiled would be:
module.getThisOrThat() /// crash and burn cause it's on global :)
I can't require() the module either because, it's the same of course when transpiled.
To pass the compiler I currently know of two options.
declare var getThisOrThat: Function;global.getThisOrThat()
Both of those work to pass the compiler check but I really want to give the entire project the benefit of the typings for this module with global functions. I've also tried adding it with a <ref /> but no luck there.