Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Oct 13, 2022

Conversation

mattezell
Copy link
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
Copy link

CLAassistant commented Oct 12, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@bartlomieju bartlomieju left a comment

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
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