Suppose I have an external JavaScript file included on the page that exports certain properties to the global scope (binds them to window).
I am looking to access some of those properties in my TypeScript projects like this:
UndeclaredExportedProperty.aFunction()
However, TypeScript does not allow me to compile that ><
I don't want to go through the complicated process of declaring the entire interface of the module since I do not know it and frankly, I do not care about it. It is simply a module that I need to call once and "trust" that by the time I make the call, it is loaded and contains the correct elements (it is non-critical, so not calling it will not lead to any major issues).
What is the simplest way to achieve this with TypeScript?
Edit in response to marking as duplicate:
While the answer to that question did resolve my issue, the questions are different (for instance, Stack cannot identify it as a duplicate suggestion) and I believe Pokus' answer provides a more straightforward and general solution for what I am trying to accomplish compared to the answers in that question.
That being said, if an admin deems this still a duplicate or too simplistic of a question, feel free to delete/close it as I have received my answer. Personally, I will keep it up because the next person searching on Google or elsewhere might find a solution more easily this way.