From 85474565b0a0d92a09fecb14e8bc0afaad7fbc64 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 1 Nov 2015 15:28:40 +0100 Subject: misc: o Playing around with type annotations. --- src/Diller.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/Diller.js') diff --git a/src/Diller.js b/src/Diller.js index dc4c5e7..e2dd47d 100644 --- a/src/Diller.js +++ b/src/Diller.js @@ -1,5 +1,11 @@ var _ = require('lodash'); +/** + * @param {DillerConfig} config + * @param {PgTx} pg + * @param {DillerDao} dao + * @constructor + */ function Diller(config, pg, dao) { var log = config.log(); @@ -46,6 +52,10 @@ function Diller(config, pg, dao) { }); } + /** + * @param deviceId int + * @param attributes object + */ function updateDeviceAttributes(deviceId, attributes) { var x = _.clone(attributes); x.deviceId = deviceId; @@ -127,11 +137,12 @@ function Diller(config, pg, dao) { }); } + /** @lends Diller.prototype */ return { onMessage: onMessage, updateDeviceAttributes: updateDeviceAttributes, updatePropertyAttributes: updatePropertyAttributes - } + }; } module.exports = Diller; -- cgit v1.2.3