Skip to content

Missing types for most properties #725

Description

@Ponynjaa

Describe the bug
The typings within the index.d.ts file are incomplete.
Here's a list of typings that I found are missing in my project:

  • Node::nodeType
  • Node::lineNumber
  • Node::columnNumber
  • Node::textContent
  • ProcessingInstruction::data
  • ProcessingInstruction::target

I currently have to use @ts-ignore everywhere I use these properties, which is... not ideal.

To Reproduce
Try to use any of the previous properties on a Node/ProcessingInstruction.

Expected behavior
The typings in the index.d.ts should represent the implemented logic 1:1.

Runtime & Version:
xmldom version: 0.9.2
runtime version: Node v20.10.0
other related software and version: typescript v5.5.4

Additional context
@karfau seemed to have tried to sync the types with the logic in #717 however it seems like something went wrong here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtypesAnything regarding Typescript

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions