UNPKG

homebridge-virtual-accessories

Version:
25 lines 729 B
/* eslint-disable curly */ import { Utils } from '../utils/utils.js'; /** * */ export class CompanionSensorConfiguration { name; type; errorFields = []; fieldNames = Utils.proxiedPropertiesOf(this); isValid(prefix) { const isValidName = (Utils.required(this.name)); const isValidType = (Utils.required(this.type)); if (!isValidName) this.errorFields.push(prefix + '.' + this.fieldNames.name); if (!isValidType) this.errorFields.push(prefix + '.' + this.fieldNames.type); return [ (isValidName && isValidType), this.errorFields, ]; } } //# sourceMappingURL=configurationCompanionSensor.js.map