# @types/node-xmpp-core

> TypeScript definitions for node-xmpp-core

Latest version **5.0.11** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/node-xmpp-core
pnpm add @types/node-xmpp-core
yarn add @types/node-xmpp-core
bun add @types/node-xmpp-core
```

## Health

**Score 45/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.11 |
| Published | 2023-11-07 |
| First published | 2017-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 5.0.11 (latest) — 2023-11-07
- 5.0.8 (ts3.8) — 2021-12-24
- 5.0.6 (ts2.1) — 2019-03-13
- 5.0.10 — 2023-10-18
- 5.0.9 — 2023-09-23
- 5.0.7 — 2021-12-16
- 5.0.5 — 2019-02-13
- 5.0.4 — 2017-10-25
- 5.0.3 — 2017-07-25
- 5.0.2 — 2017-03-30
- 5.0.1 — 2017-03-24
- 5.0.0 — 2017-03-10

## README

# Installation
> `npm install --save @types/node-xmpp-core`

# Summary
This package contains type definitions for node-xmpp-core (https://github.com/node-xmpp/node-xmpp).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-xmpp-core.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-xmpp-core/index.d.ts)
````ts
/// <reference types="node" />
import { EventEmitter } from "events";
import { Element } from "ltx";

// fixme: not ideal
export { createElement, Element, escapeXML, escapeXMLText } from "ltx";

export class Connection extends EventEmitter {
    constructor(opts?: any);
}

export namespace SRV {
    /**
     * returns a lazy iterator which can be restarted via connection.connect()
     */
    function connect(opts?: any): any;
}

export class Stanza extends Element {
    from: string;
    to: string;
    id: string;
    type: string;

    constructor(name: string, attrs?: any);
}

/**
 * JSX compatible API, use this function as pragma
 * https://facebook.github.io/jsx/
 * Returns a Stanza if name is presence, message or iq an ltx Element otherwise.
 *
 * @param name  name of the element
 * @param attrs attribute key/value pairs
 */
export function createStanza(name: string, attrs?: any): Element;

export class IQ extends Stanza {
    constructor(attrs?: any);
}

export class Message extends Stanza {
    constructor(attrs?: any);
}

export class Presence extends Stanza {
    constructor(attrs?: any);
}

export class JID {
    local: string;
    domain: string;
    resource: string;

    constructor(local: string, domain?: string, resource?: string);

    parseJID(jid: string): void;

    toString(unescape?: any): string;

    /**
     * Convenience method to distinguish users
     */
    bare(): JID;

    /**
     * Comparison function
     */
    equals(other: JID): boolean;

    /**
     * http://xmpp.org/rfcs/rfc6122.html#addressing-localpart
     */
    setLocal(local: string, escape?: any): void;

    getLocal(unescape?: any): string;

    /**
     * http://xmpp.org/rfcs/rfc6122.html#addressing-domain
     */
    setDomain(value: string): void;

    getDomain(): string;

    /**
     * http://xmpp.org/rfcs/rfc6122.html#addressing-resourcepart
     */
    setResource(value: string): void;

    getResource(): string;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/ltx](https://npmjs.com/package/@types/ltx), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by .

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