Skip to content

Commit

Permalink
Add minimal libdom for @babel/standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 8, 2024
1 parent 2083566 commit 8e55b8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 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<T> {}
declare interface HTMLScriptElement {}
1 change: 1 addition & 0 deletions tsconfig.dts-bundles.json
Expand Up @@ -7,6 +7,7 @@
}
},
"include": [
"./lib/libdom-minimal.d.ts",
"packages/babel-parser/typings/*.d.ts",
"packages/*/lib/*.d.ts",
"eslint/*/lib/*.d.ts",
Expand Down

0 comments on commit 8e55b8c

Please sign in to comment.