Skip to content

TypeScript types #39

@gauthierm

Description

@gauthierm

This package has a simple interface and TypeScript types can be added by including an index.d.ts file containing:

  interface XMLElement {
    name: string;
    attributes: {
      [name: string]: string;
    };
    value: string;
    children: XMLElement[];
  }

  export default class XMLParser {
    constructor();
    public parseFromString(string: string): XMLElement;
    public toString(xml: XMLElement): string;
    public getElementsByTagName(tagName: string): XMLElement[];
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions