diff --git a/lib/libdom-minimal.d.ts b/lib/libdom-minimal.d.ts new file mode 100644 index 000000000000..8633a79bb029 --- /dev/null +++ b/lib/libdom-minimal.d.ts @@ -0,0 +1,8 @@ +// Minimal version of lib.dom.d.ts. @babel/standalone needs these types +// to be defined, but we don't want to load the full lib.dom.d.ts in +// tscondif.dts-bundles.json because we don't want other .d.ts files to +// accidenally rely on DOM features. + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +declare interface HTMLCollectionOf {} +declare interface HTMLScriptElement {} diff --git a/tsconfig.dts-bundles.json b/tsconfig.dts-bundles.json index 10bfb8744390..712a7acc17ab 100644 --- a/tsconfig.dts-bundles.json +++ b/tsconfig.dts-bundles.json @@ -7,6 +7,7 @@ } }, "include": [ + "./lib/libdom-minimal.d.ts", "packages/babel-parser/typings/*.d.ts", "packages/*/lib/*.d.ts", "eslint/*/lib/*.d.ts",