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

0.13.4 • Public • Published

Installation

npm install --save @types/xmpp__xml

Summary

This package contains type definitions for @xmpp/xml (https://github.com/xmppjs/xmpp.js/tree/main/packages/xml).

Details

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

index.d.ts

export = xml;

import * as ltx from "ltx";
import * as escape from "ltx/lib/escape";
import LtxParser = require("ltx/lib/parsers/ltx");

declare function xml(...args: Parameters<typeof ltx.createElement>): ReturnType<typeof ltx.createElement>;

declare namespace xml {
    type Element = ltx.Element;
    type Node = ltx.Node;

    const Element: typeof ltx.Element;
    const createElement: typeof ltx.createElement;

    const escapeXML: typeof escape.escapeXML;
    const unescapeXML: typeof escape.unescapeXML;
    const escapeXMLText: typeof escape.escapeXMLText;
    const unescapeXMLText: typeof escape.unescapeXMLText;

    class Parser extends ltx.Parser {
        static readonly XMLError: typeof XMLError;
        readonly parser: LtxParser;
        root: Element | null;
        cursor: Element | null;

        onStartElement(name: string, attrs?: string | { [attrName: string]: any }): void;
        onEndElement(name: string): void;
        onText(str: string): void;
    }

    class XMLError extends Error {
        readonly name: "XMLError";
    }
}

declare global {
    namespace JSX {
        interface IntrinsicElements {
            [elemName: string]: any;
        }

        type Element = xml.Element;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/ltx

Credits

These definitions were written by BendingBender.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.13.1776ts3.8
0.13.1776ts3.9
0.13.1776ts4.0
0.13.1776ts4.1
0.13.1776ts4.2
0.13.4575ts5.7
0.13.4575ts5.6
0.13.4575latest
0.13.4575ts4.5
0.13.4575ts4.6
0.13.4575ts4.7
0.13.4575ts4.8
0.13.4575ts4.9
0.13.4575ts5.0
0.13.4575ts5.1
0.13.4575ts5.2
0.13.4575ts5.3
0.13.4575ts5.4
0.13.4575ts5.5
0.13.4575ts5.8
0.6.110ts3.2
0.6.110ts3.3
0.6.110ts3.4
0.6.110ts3.5
0.6.110ts3.6
0.6.110ts3.7
0.13.24ts4.3
0.13.24ts4.4
0.6.01ts2.2
0.6.01ts2.3
0.6.01ts2.4
0.6.01ts2.5
0.6.01ts2.6
0.6.01ts2.7
0.6.01ts2.8
0.6.01ts2.9
0.6.01ts3.0
0.6.01ts3.1

Version History

VersionDownloads (Last 7 Days)Published
0.13.4575
0.13.31
0.13.24
0.13.1776
0.13.00
0.6.110
0.6.01

Package Sidebar

Install

npm i @types/xmpp__xml

Weekly Downloads

1,367

Version

0.13.4

License

MIT

Unpacked Size

5.12 kB

Total Files

5

Last publish

Collaborators

  • types