# @types/xmpp__xml

> TypeScript definitions for @xmpp/xml

Latest version **0.14.0** (published 2025-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/xmpp__xml
pnpm add @types/xmpp__xml
yarn add @types/xmpp__xml
bun add @types/xmpp__xml
```

## Health

**Score 70/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.14.0 |
| Published | 2025-12-11 |
| First published | 2018-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51447 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/xmpp__xml
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__xml
- npm.io page: https://npm.io/package/@types/xmpp__xml

## Dependencies (1)

- [@types/ltx](https://npm.io/package/@types/ltx.md) *

## Recent versions

- 0.14.0 (latest) — 2025-12-11
- 0.13.5 (ts5.1) — 2025-06-23
- 0.13.4 (ts4.9) — 2023-11-07
- 0.13.2 (ts4.4) — 2023-08-30
- 0.13.1 (ts3.9) — 2021-11-30
- 0.6.1 (ts3.2) — 2020-09-26
- 0.6.0 (ts2.3) — 2018-12-06
- 0.13.3 — 2023-10-18
- 0.13.0 — 2021-11-19

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__xml/index.d.ts)
````ts
export default xml;

import * as ltx from "ltx";

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

type Element = ltx.Element;
type Node = ltx.Node;

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

declare const escapeXML: typeof ltx.escapeXML;
declare const unescapeXML: typeof ltx.unescapeXML;
declare const escapeXMLText: typeof ltx.escapeXMLText;
declare const unescapeXMLText: typeof ltx.unescapeXMLText;

export { createElement, Element, escapeXML, escapeXMLText, Node, unescapeXML, unescapeXMLText };

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

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

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

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

        type Element = ltx.Element;
    }
}

````

### Additional Details
 * Last updated: Thu, 11 Dec 2025 21:02:12 GMT
 * Dependencies: [@types/ltx](https://npmjs.com/package/@types/ltx)

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).

---
_Source: https://npm.io/package/@types/xmpp__xml · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
