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.