This is a "copy" of DefinitelyTyped/DefinitelyTyped#49953
since we copied the type definitions from DefinitlyTyped to fix the (types) regression introduced in #278.
The current types reference TypeScript's DOM typings with /// <reference lib="dom" />. This causes any module that imports xmldom to get the entire DOM typings, including globals like document.
With those globals defined we lose errors when accidentally referencing them, which can obviously cause crashes.
It'd be great if we would only provide the types that we use and export, like DOMImplementation, Document, Node, etc.
Related "main thread": #191
This is a "copy" of DefinitelyTyped/DefinitelyTyped#49953
since we copied the type definitions from DefinitlyTyped to fix the (types) regression introduced in #278.
The current types reference TypeScript's DOM typings with
/// <reference lib="dom" />. This causes any module that imports xmldom to get the entire DOM typings, including globals likedocument.With those globals defined we lose errors when accidentally referencing them, which can obviously cause crashes.
It'd be great if we would only provide the types that we use and export, like
DOMImplementation,Document,Node, etc.Related "main thread": #191