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

Remove window declarations from pure types #560

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

fruchtose-stripe
Copy link
Contributor

Summary & motivation

This PR fixes an issue from this comment: #543 (comment)

Both pure/index.d.ts and dist/index.d.ts attempt to modify the Window class. The types/pure.d.ts imports loadStripe from types/index.d.ts, and the latter module monkeypatches Window. The pure module then receives both the function type it wants, as well as the monkeypatched Window class.

I have fixed the issue by moving the loadStripe declaration into a new shared.d.ts module.

Testing & documentation

I built the types and verified that Window is no longer monkeypatched in the pure output types.

@fruchtose-stripe fruchtose-stripe merged commit 44393f6 into master Feb 21, 2024
2 checks passed
@fruchtose-stripe fruchtose-stripe deleted the fruchtose/pure-window branch February 21, 2024 18:51
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.

2 participants