var /** * @type SlackWrapper **/ SLACK; /** * @constructor **/ function SlackWrapper() { /** @type {number} */ this.lastServerVersion = 0; /** @type {SlackData} */ this.context = new SlackData(null); } SlackWrapper.prototype.update = function(data) { if (data.v) this.lastServerVersion = data.v; if (data.static) { this.context.updateStatic(data.static); onContextUpdated(); } if (data.live) { console.log("updated LIVE"); } console.log(this); }; SLACK = new SlackWrapper();