I'll look at that option; this article was something I came across ... perhaps I'll run this pattern on the next project I do. The article I found that generated this one was two years old and piqued my curiosity.
Unfortunately, I didn't find this on a quick search.
I did find something interesting I wanted to try out.
As to <any>window ... there is a specific need within my project (which will be made public soon, not yet).
Thanks for the "food for thought," awesome information!
“As much as I’d love our code to be fully compliant with the great programming practices of this world, I’d rather have it working — if possible before the heat death of the Universe.”
There is a way to extend the Window interface and declare the type of your globals so that you don't lose TS's help (using any should always be avoided):in a typings.d.ts file possibly at the root of your source folder, write something like that:
I'll look at that option; this article was something I came across ... perhaps I'll run this pattern on the next project I do. The article I found that generated this one was two years old and piqued my curiosity.
As to <any>window ... there is a specific need within my project (which will be made public soon, not yet).
Thanks for the "food for thought," awesome information!
There is a way to extend the
Window
interface and declare the type of your globals so that you don't lose TS's help (usingany
should always be avoided):in a typings.d.ts file possibly at the root of your source folder, write something like that:Elegant. I’ve gone through a few other things. I’ll try it out.