mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
723052d5bb
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
21 lines
607 B
TypeScript
21 lines
607 B
TypeScript
/**
|
|
* These global declarations exist so puppeteer can work without the need to use `"dom"`
|
|
* types.
|
|
*
|
|
* To get full type information for these interfaces, add `"types": "dom"`in your
|
|
* `tsconfig.json` file.
|
|
*/
|
|
declare global {
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
interface Document {}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
interface Element {}
|
|
|
|
// eslint-disable-next-line max-len
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-unused-vars
|
|
interface NodeListOf<TNode> {}
|
|
}
|
|
|
|
export {};
|