UNPKG

matterbridge-roborock-vacuum-plugin

Version:
20 lines (15 loc) 411 B
import { Dps, DpsPayload } from './dps.js'; export class ResponseMessage { readonly duid: string; readonly dps: Dps; constructor(duid: string, dps: Dps) { this.duid = duid; this.dps = dps; } contain(index: number | string): boolean { return this.dps[index.toString()] !== undefined; } get(index: number | string): string | DpsPayload { return this.dps[index.toString()]; } }