# @types/xmpp__jid

> TypeScript definitions for @xmpp/jid

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

## Install

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

## 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 | 2017-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51466 |
| Maintainers | types |

## Links

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

## Recent versions

- 0.14.0 (latest) — 2025-12-11
- 1.3.5 (ts5.1) — 2023-11-07
- 1.3.3 (ts4.2) — 2021-12-24
- 1.3.1 (ts3.5) — 2020-09-26
- 1.3.0 (ts2.5) — 2019-10-01
- 1.3.4 — 2023-10-18
- 1.3.2 — 2021-11-21
- 1.2.1 — 2019-03-12
- 0.6.1 — 2019-02-14
- 0.6.0 — 2018-12-03
- 0.0.3 — 2017-08-24
- 0.0.2 — 2017-04-12
- 0.0.1 — 2017-03-30
- 0.0.0 — 2017-03-24

## README

# Installation
> `npm install --save @types/xmpp__jid`

# Summary
This package contains type definitions for @xmpp/jid (https://github.com/xmppjs/xmpp.js/tree/main/packages/jid).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__jid.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__jid/index.d.ts)
````ts
declare function jid(address: string): JID;
declare function jid(...args: ConstructorParameters<typeof JID>): JID;

export { detectEscape, escapeLocal, JID, jid, parse, unescapeLocal };

declare const j: typeof jid & {
    jid: typeof jid;
    JID: typeof JID;
    parse: typeof parse;
    equal: typeof equal;
    detectEscape: typeof detectEscape;
    escapeLocal: typeof escapeLocal;
    unescapeLocal: typeof unescapeLocal;
};

export default j;

type JidFn = typeof jid;

declare function equal(a: JID, b: JID): boolean;
declare function detectEscape(local?: string): boolean;
declare function escapeLocal(local: string): string;
declare function unescapeLocal(local: string): string;
declare function parse(s: string): JID;

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

    constructor(local: string | null | undefined, domain: string, resource?: string | null);

    toString(unescape?: boolean): 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?: boolean): void;

    getLocal(unescape?: boolean): 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: Thu, 11 Dec 2025 21:02:12 GMT
 * Dependencies: none

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).

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