Skip to content

fix(utils): Remove Element dom type #5675

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

Merged
merged 1 commit into from
Sep 1, 2022
Merged

Conversation

AbhiPrasad
Copy link
Member

Fixes #5673

Prev similar incident #4451

This PR removes the use of the Element DOM type from @sentry/utils, introduced with #5594. This breaks @sentry/node users that use strict TS configs.

We have to cast the type to any to make sure it works in different environments, but we supply a generic argument so that users can specify what type of Element will be returned from querySelector.

@AbhiPrasad AbhiPrasad requested a review from Lms24 September 1, 2022 14:21
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) September 1, 2022 14:23
@AbhiPrasad AbhiPrasad merged commit 5efdabe into master Sep 1, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-get-dom-element-typing branch September 1, 2022 14:35
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.

unable to compile "Cannot find name 'Element'"
2 participants