Skip to content

Chore: Added onbeforeunload to window type definition + updated test - #16251

Merged
bartlomieju merged 3 commits into
denoland:mainfrom
mattezell:window-onbeforeload
Oct 13, 2022
Merged

bartlomieju merged 3 commits into
denoland:mainfrom
mattezell:window-onbeforeload

Conversation

@mattezell

Copy link
Copy Markdown
Contributor

I've been playing with Deno a bit recently (since becoming FUNemployed as a result of layoff) 🥳

In playing around with globalThis and event handlers/listener, I noticed that onbeforeunload wasn't present on the window type definition, resulting in the following warning:

Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.deno-ts(7017)

The observation is discussed a bit more here in this somewhat related thread: #13390

I figured this presented me with an opportunity to learn a bit more about Deno, so I set out to address this by updating the typings to include onbeforeunload.

Additionally, I've updated the onload integration test to the update update.

Please let me know if I've missed anything.

Thanks!
-Matt

@CLAassistant

CLAassistant commented Oct 12, 2022 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice fix, thank you @mattezell!

@bartlomieju
bartlomieju merged commit 06ccb6d into denoland:main Oct 13, 2022
@mattezell

Copy link
Copy Markdown
Contributor Author

I'm super stoked about having this merged! Thank you, @bartlomieju!

@mattezell
mattezell deleted the window-onbeforeload branch October 13, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants