typescriptifying

This commit is contained in:
Wolfgang Hottgenroth
2018-01-09 16:36:14 +01:00
parent 9e39d74084
commit 8d85314fc9
21 changed files with 372 additions and 182 deletions

21
dist/AItem.js vendored Normal file
View File

@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logger = require("./log");
const MqttDispatcher_1 = require("./MqttDispatcher");
class AItem {
constructor(floor, room, item) {
this.floor = floor;
this.room = room;
this.item = item;
this.itemId = `${this.floor}.${this.room}.${this.item}`;
this.topicFirstPart = `dispatcher_ng/items/${this.floor}/${this.room}/${this.item}`;
}
start() {
MqttDispatcher_1.mqttHandler.register(this.subscribeTopics, (topic, payload) => {
logger.info(`item ${this.itemId}: ${topic}, ${payload}`);
this.processMessage(topic, payload);
});
}
}
exports.AItem = AItem;
//# sourceMappingURL=AItem.js.map