“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:
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.