@types/xmldom
TypeScript icon, indicating that this package has built-in type declarations

0.1.34 • Public • Published

Installation

npm install --save @types/xmldom

Summary

This package contains type definitions for xmldom (https://github.com/xmldom/xmldom).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmldom.

index.d.ts

/// <reference lib="dom" />

declare namespace xmldom {
    var DOMParser: DOMParserStatic;
    var XMLSerializer: XMLSerializerStatic;
    var DOMImplementation: DOMImplementationStatic;

    interface DOMImplementationStatic {
        new(): DOMImplementation;
    }

    interface DOMParserStatic {
        new(): DOMParser;
        new(options: Options): DOMParser;
    }

    interface XMLSerializerStatic {
        new(): XMLSerializer;
    }

    interface DOMParser {
        parseFromString(xmlsource: string, mimeType?: string): Document;
    }

    interface XMLSerializer {
        serializeToString(node: Node): string;
    }

    interface Options {
        locator?: any;
        errorHandler?: ErrorHandlerFunction | ErrorHandlerObject | undefined;
    }

    interface ErrorHandlerFunction {
        (level: string, msg: any): any;
    }

    interface ErrorHandlerObject {
        warning?: ((msg: any) => any) | undefined;
        error?: ((msg: any) => any) | undefined;
        fatalError?: ((msg: any) => any) | undefined;
    }
}

export = xmldom;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Qubo, and Karfau.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/xmldom

Weekly Downloads

212,219

Version

0.1.34

License

MIT

Unpacked Size

4.8 kB

Total Files

5

Last publish

Collaborators

  • types