Skip to content

xmldom types include globals that don't exist in Node #49953

Description

@justinfagnani

The xmldom 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 xmldom could pick off only the DOM types that it uses and exports, like DOMImplementation, Document, Node, etc. I'm not sure if this is possible with lib.dom.d.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions