TypeScript-DOM-lib-generator
                                
                                 TypeScript-DOM-lib-generator copied to clipboard
                                
                                    TypeScript-DOM-lib-generator copied to clipboard
                            
                            
                            
                        Separate WebAssembly types from `lib.dom.d.ts` into their own file
Currently, if you wish to use WebAssembly, you need to include lib.dom.d.ts, even in cases where that’s incorrect (e.g.: NodeJS or Deno).
The solution would be to move non‑web‑specific[^1] WebAssembly types to a new lib.wasm.d.ts file.
[^1]: Web‑specific WebAssembly types are those defined in https://webassembly.github.io/spec/web-api/index.html. Non‑web‑specific WebAssembly types are those defined in https://webassembly.github.io/spec/js-api/index.html.
See also: https://github.com/microsoft/TSJS-lib-generator/issues/211
+1
Currently I can't define AbortController/AbortSignal/EventTarget/Event for [email protected] because typings include lib.dom.d.ts (with its own implementation of AbortController/AbortSignal, etc.) (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48981)
@Semigradsky That’s unrelated to this.
Your case is happening because you’re defining them using class EventTarget instead of interface EventTarget { ... } and declare var EventTarget: EventTargetConstructor, but that depends on TypeScript language support: https://github.com/microsoft/TypeScript/issues/39054#issuecomment-644299696 and https://github.com/microsoft/TypeScript/issues/39504.