Stop using window as any
TLDR;
for someone who have a limit of time
// instead of this
(window as any).MY_GREETING_MESSAGE = 'Hi Earth!'
// do this
declare global {
interface Window {
MY_GREETING_MESSAGE: string
}
}
window.MY_GREETING_MESSAGE = 'Hi Earth!'