Socket
Socket
Sign inDemoInstall

@types/node-xmpp-core

Package Overview
Dependencies
4
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/node-xmpp-core

TypeScript definitions for node-xmpp-core


Version published
Weekly downloads
72
decreased by-59.78%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

// Type definitions for node-xmpp-core 5.0
// Project: https://github.com/node-xmpp/node-xmpp
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="node" />
import { Element } from 'ltx';
import { EventEmitter } from 'events';

// 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: Thu, 23 Dec 2021 23:35:13 GMT
  • Dependencies: @types/ltx, @types/node
  • Global values: none

Credits

These definitions were written by DefinitelyTyped.

FAQs

Last updated on 24 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc