import { BaseRpcContext } from './base-rpc.context'; type MqttContextArgs = [string, Record]; /** * @publicApi */ export class MqttContext extends BaseRpcContext { constructor(args: MqttContextArgs) { super(args); } /** * Returns the name of the topic. */ getTopic() { return this.args[0]; } /** * Returns the reference to the original MQTT packet. */ getPacket() { return this.args[1]; } }