I have met the same issue.
When I typed above code to my file and met the another issue said "Subsequent variable declarations must have the same type. Variable 'window' must be of type 'Window & typeof globalThis', but here has type 'any'.ts(2403)".
Could you help me with solving this issue?
Software developer and content creator. Author of the upcoming book, A Modern JavaScript Primer. Preorder a copy here https://naftalimurgor.gumroad.com/l/modern-javascript-primer
I have met the same issue.
When I typed above code to my file and met the another issue said "Subsequent variable declarations must have the same type. Variable 'window' must be of type 'Window & typeof globalThis', but here has type 'any'.ts(2403)".
Could you help me with solving this issue?
Hi!
Please share a github or codepen so I can have a look