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

1.3.5 • Public • Published

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

export = jid;

declare function jid(address: string): jid.JID;
declare function jid(...args: ConstructorParameters<typeof jid.JID>): jid.JID;

type JidFn = typeof jid;

declare namespace jid {
    const jid: JidFn;

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

    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: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/xmpp__jid

Weekly Downloads

600

Version

1.3.5

License

MIT

Unpacked Size

5.38 kB

Total Files

5

Last publish

Collaborators

  • types