Skip to content

Commit

Permalink
fix(types): revert "feat(typescript): allow using puppeteer without d…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
johanbay committed Dec 10, 2021
1 parent 8242422 commit 02c9af6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 50 deletions.
29 changes: 0 additions & 29 deletions inject-global-type-stubs.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -36,7 +36,7 @@
"apply-next-version": "node utils/apply_next_version.js",
"test-install": "scripts/test-install.sh",
"clean-docs": "rimraf website/docs && rimraf docs-api-json",
"generate-d-ts": "npm run clean-docs && api-extractor run --local --verbose && node inject-global-type-stubs.js",
"generate-d-ts": "npm run clean-docs && api-extractor run --local --verbose",
"generate-docs": "npm run generate-d-ts && api-documenter markdown -i docs-api-json -o website/docs && node utils/remove-tag.js",
"ensure-correct-devtools-protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package",
"ensure-pinned-deps": "ts-node -s scripts/ensure-pinned-deps",
Expand Down
20 changes: 0 additions & 20 deletions src/global.ts

This file was deleted.

0 comments on commit 02c9af6

Please sign in to comment.