mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(agnostic): Remove use of util.promisify (#6446)
In `src/common` we now use `fs.promises.X` which we can dynamically `import`. In a browser environment this code will never run because it's gated on `isNode` (in a future PR we will add tree-shaking to the bundle step such that this code is eliminated). By using `import`, we ensure TypeScript still can track types and give good type information. In `src/node` we continue to use `util.promisify` but that's not a concern as that code explicitly is never run in the browser.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user