-
Notifications
You must be signed in to change notification settings - Fork 311
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
feat: remove dom dependency #108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for more information see microsoft/TypeScript#23893 |
brikou
force-pushed
the
feature/fix_dom_deps
branch
from
September 13, 2018 10:28
7c8e8a2
to
bd8bc78
Compare
jasonkuhrt
approved these changes
May 28, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brikou!
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
jasonkuhrt
added a commit
that referenced
this pull request
May 29, 2020
closes #15 closes #26 Relates to #100 Relates to #108 This approach was originally implemented by @kallaspriit in #100. This approach ships TypeScript types inline with this library rather than relying on global fetch types in lib.dom.d.ts. The benefits of this approach are: 1. It avoids consumers (direct or indirect) needing to add `dom` to their lib setting in tsconfig. This can be very confusing for Node projects and adds legitimate room for error since it allows any DOM globals to be used in the Node app which is almost certainly wrong. 2. The file-directive approach (see #108) fails in two ways: 1. If consumers customize lib config but leave out `dom` things break just the same. 2. It adds dom globals which is bad but now in a very unexpected/hidden way. 3. It aligns well with our ponyfill (not polyfill) approach. The downsides of this approach are: 1. We aren't benefiting from improvements in the TS lib types. So improvements to fetch typing for example would not pass through to graphql-request users transparently. It would require a new release of graphql-request.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #26 supersed #100
should be merge after #107 as based on it ping @divyenduz 😛