|
3 | 3 | */ |
4 | 4 | import TopicAliasRecv from './topic-alias-recv' |
5 | 5 | import mqttPacket, { |
6 | | - IAuthPacket, |
| 6 | + type IAuthPacket, |
7 | 7 | IConnackPacket, |
8 | 8 | IDisconnectPacket, |
9 | 9 | IPublishPacket, |
10 | | - ISubscribePacket, |
11 | | - ISubscription, |
12 | | - IUnsubscribePacket, |
| 10 | + type ISubscribePacket, |
| 11 | + type ISubscription, |
| 12 | + type IUnsubscribePacket, |
13 | 13 | Packet, |
14 | | - QoS, |
15 | | - ISubackPacket, |
16 | | - IConnectPacket, |
| 14 | + type QoS, |
| 15 | + type ISubackPacket, |
| 16 | + type IConnectPacket, |
17 | 17 | } from 'mqtt-packet' |
18 | 18 | import DefaultMessageIdProvider, { |
19 | | - IMessageIdProvider, |
| 19 | + type IMessageIdProvider, |
20 | 20 | } from './default-message-id-provider' |
21 | | -import { DuplexOptions, Writable } from 'readable-stream' |
| 21 | +import { type DuplexOptions, Writable } from 'readable-stream' |
22 | 22 | import clone from 'rfdc/default' |
23 | 23 | import * as validations from './validations' |
24 | 24 | import _debug from 'debug' |
25 | | -import Store, { IStore } from './store' |
| 25 | +import Store, { type IStore } from './store' |
26 | 26 | import handlePacket from './handlers' |
27 | | -import { ClientOptions } from 'ws' |
28 | | -import { ClientRequestArgs } from 'http' |
| 27 | +import type { ClientOptions } from 'ws' |
| 28 | +import { type ClientRequestArgs } from 'http' |
29 | 29 | import { |
30 | | - DoneCallback, |
31 | | - ErrorWithReasonCode, |
32 | | - GenericCallback, |
33 | | - IStream, |
| 30 | + type DoneCallback, |
| 31 | + type ErrorWithReasonCode, |
| 32 | + type GenericCallback, |
| 33 | + type IStream, |
34 | 34 | MQTTJS_VERSION, |
35 | | - StreamBuilder, |
36 | | - TimerVariant, |
37 | | - VoidCallback, |
| 35 | + type StreamBuilder, |
| 36 | + type TimerVariant, |
| 37 | + type VoidCallback, |
38 | 38 | nextTick, |
39 | 39 | } from './shared' |
40 | | -import TopicAliasSend from './topic-alias-send' |
| 40 | +import type TopicAliasSend from './topic-alias-send' |
41 | 41 | import { TypedEventEmitter } from './TypedEmitter' |
42 | 42 | import KeepaliveManager from './KeepaliveManager' |
43 | 43 | import isBrowser, { isWebWorker } from './is-browser' |
44 | | -import { Timer } from './get-timer' |
| 44 | +import { type Timer } from './get-timer' |
45 | 45 |
|
46 | 46 | const setImmediate = |
47 | 47 | globalThis.setImmediate || |
|
0 commit comments