0.13.3 • Published 6 months ago

@types/xmpp__connection-tcp v0.13.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/xmpp__connection-tcp

Summary

This package contains type definitions for @xmpp/connection-tcp (https://github.com/xmppjs/xmpp.js/tree/main/packages/connection-tcp).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__connection-tcp.

index.d.ts

// Type definitions for @xmpp/connection-tcp 0.13
// Project: https://github.com/xmppjs/xmpp.js/tree/main/packages/connection-tcp
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import Connection = require('@xmpp/connection');
import { Element } from '@xmpp/xml';
import { Socket } from 'net';
import { URL } from 'url';

export = ConnectionTCP;

declare class ConnectionTCP extends Connection {
    sendMany(elements: Iterable<Element>): Promise<void>;
    socketParameters(service: string | URL): ConnectionTCP.SocketParameters | undefined;
    headerElement(): Element;

    Socket: ConnectionTCP.SocketConstructor;
}

declare namespace ConnectionTCP {
    interface SocketParameters {
        port: number | null;
        host: string;
    }

    interface SocketConstructor extends Connection.SocketConstructor {
        new (): Socket;
    }
}

Additional Details

Credits

These definitions were written by BendingBender.