heyujie
2021-05-24 4885600ecc369aa2e30a65de8dd7a410f13c34df
node_modules/mqtt/test/typescript/broker-connect-subscribe-and-publish.ts
@@ -9,7 +9,7 @@
console.log(`connect(${JSON.stringify(BROKER)})`)
const client:Client = connect(`mqtt://${BROKER}`, opts)
client.subscribe({[TOPIC]: 2}, (err, granted) => {
client.subscribe({[TOPIC]: {qos: 2}}, (err, granted) => {
    granted.forEach(({topic, qos}) => {
        console.log(`subscribed to ${topic} with qos=${qos}`)
    })