1 |
|
2 | import type { Packet } from 'mqtt-packet';
|
3 | import type { Duplex } from 'stream';
|
4 | import type MqttClient from './client';
|
5 | import type { IClientOptions } from './client';
|
6 | export type DoneCallback = (error?: Error) => void;
|
7 | export type GenericCallback<T> = (error?: Error, result?: T) => void;
|
8 | export type VoidCallback = () => void;
|
9 | export type IStream = Duplex & {
|
10 | socket?: any;
|
11 | };
|
12 | export type StreamBuilder = (client: MqttClient, opts?: IClientOptions) => IStream;
|
13 | export type Callback = () => void;
|
14 | export type PacketHandler = (client: MqttClient, packet: Packet, done?: DoneCallback) => void;
|
15 | export type TimerVariant = 'auto' | 'worker' | 'native';
|
16 | export declare class ErrorWithReasonCode extends Error {
|
17 | code: number;
|
18 | constructor(message: string, code: number);
|
19 | }
|
20 | export type Constructor<T = {}> = new (...args: any[]) => T;
|
21 | export declare function applyMixin(target: Constructor, mixin: Constructor, includeConstructor?: boolean): void;
|
22 | export declare const nextTick: (callback: Function, ...args: any[]) => void;
|
23 | export declare const MQTTJS_VERSION: any;
|