Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 579d434

Browse files
committedJan 16, 2023
fix(mqtt): fixed how mqtt library is imported
Minor fixes
1 parent 528ee6b commit 579d434

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
resolve(),
2121
typescript(),
2222
commonjs(),
23-
// terser(),
23+
terser(),
2424
sizes()
2525
]
2626
};

‎rollup.config.lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
resolve(),
2121
typescript(),
2222
commonjs(),
23-
// terser(),
23+
terser(),
2424
sizes()
2525
]
2626
};

‎src/connection/Connection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import jws from 'jws';
2-
import mqtt, { MqttClient } from 'mqtt';
2+
import mqtt from 'mqtt';
33
import { Observable, Subject } from 'rxjs';
44

55
import SenML from '../senML';
@@ -38,7 +38,7 @@ export class Connection implements IConnection {
3838
host: string,
3939
port: string | number,
4040
token: string,
41-
mqttConnect: (string, IClientOptions) => MqttClient
41+
mqttConnect: (string, IClientOptions) => mqtt.MqttClient
4242
): Promise<IConnection> {
4343
if (!token) throw new Error('connection failed: you need to provide a valid token');
4444
if (!host) throw new Error('connection failed: you need to provide a valid host (broker)');

0 commit comments

Comments
 (0)
Please sign in to comment.