-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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(typescript): allow using puppeteer without dom lib #6998
Merged
jschfflr
merged 4 commits into
puppeteer:main
from
remcohaszing:allow-usage-without-dom-types
Sep 11, 2021
Merged
feat(typescript): allow using puppeteer without dom lib #6998
jschfflr
merged 4 commits into
puppeteer:main
from
remcohaszing:allow-usage-without-dom-types
Sep 11, 2021
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
mathiasbynens
force-pushed
the
main
branch
4 times, most recently
from
September 3, 2021 07:14
03a4ca1
to
d4b17bd
Compare
Hi @remcohaszing, thanks for your contribution! |
The dom lib inserts all dom related types into the project, which is often undesirable when working on a NodeJS project. This change injects global stubs for the dom types required by puppeteer, so puppeteer can work without users having to add dom types to their project. Closes #6989
I’m not entirely sure what happened 3 months ago, but I had to reset to main, cherry-pick, and force push in order to fix this PR. Anyway, it’s fixed now. 😄 |
jschfflr
approved these changes
Sep 11, 2021
jschfflr
pushed a commit
to mushishi78/puppeteer
that referenced
this pull request
Sep 16, 2021
The dom lib inserts all dom related types into the project, which is often undesirable when working on a NodeJS project. This change injects global stubs for the dom types required by puppeteer, so puppeteer can work without users having to add dom types to their project. Closes puppeteer#6989
OrKoN
pushed a commit
that referenced
this pull request
Dec 10, 2021
…om lib" Reverts #6998 We unfortunately have to revert this commit for two reasons: The approach for generating types.d.ts implemented in the commit invalidates triple-slash compiler directives since it prepends a declaration before the types.d.ts generated by api-extractor. In particular, the directive /// <reference types="node" /> in the final types.d.ts is ignored by the typescript compiler making module resolution fail. The commit makes Puppeteer types ship without DOM types per default. This is not ideal since Puppeteer (and usage of Puppeteer) relies heavily on interacting with DOM elements.
This was referenced May 30, 2022
This was referenced May 30, 2022
This was referenced May 30, 2022
This was referenced Jun 13, 2022
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.
The dom lib inserts all dom related types into the project, which is often undesirable when working on a NodeJS project.
This change injects global stubs for the dom types required by puppeteer, so puppeteer can work without users having to add dom types to their project.
Closes #6989