Skip to content

Commit 16cd70c

Browse files
committed
Fixed console messages.
1 parent 37a4e8d commit 16cd70c

File tree

11 files changed

+329
-382
lines changed

11 files changed

+329
-382
lines changed

package-lock.json

Lines changed: 306 additions & 346 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cache/cache.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ cwc.Cache = function(helper) {
4141
/** @type {!cwc.utils.Helper} */
4242
this.helper = helper;
4343

44-
/** @private {!string} */
45-
this.version = '3';
44+
/** @private {!number} */
45+
this.version = 3;
4646

4747
/** @private {!cwc.utils.Database} */
4848
this.database_ = new cwc.utils.Database(this.name, this.version);
@@ -162,9 +162,6 @@ cwc.Cache.prototype.getLibraryFile = function(name) {
162162
};
163163

164164

165-
/**
166-
* @return {Promise}
167-
*/
168165
cwc.Cache.prototype.clearLibraryFiles = function() {
169166
return this.database_.clearFiles('__library__');
170167
};

src/mode/lego/ev3/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ cwc.mode.lego.ev3.Connection.prototype.stop = function() {
153153

154154

155155
/**
156-
* @param {Event} e
156+
* @param {Event|Object} e
157157
* @private
158158
*/
159159
cwc.mode.lego.ev3.Connection.prototype.handleConnecting_ = function(e) {

src/mode/sphero/classic/connection.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,6 @@ cwc.mode.sphero.classic.Connection.prototype.stop = function() {
108108
};
109109

110110

111-
/**
112-
* Resets the connection.
113-
* @param {Event=} opt_event
114-
* @export
115-
*/
116-
cwc.mode.sphero.classic.Connection.prototype.reset = function(opt_event) {
117-
if (this.isConnected()) {
118-
this.api_.reset();
119-
}
120-
};
121-
122-
123111
/**
124112
* @return {!boolean}
125113
* @export
@@ -161,7 +149,7 @@ cwc.mode.sphero.classic.Connection.prototype.cleanUp = function() {
161149

162150

163151
/**
164-
* @param {Event} e
152+
* @param {Event|Object} e
165153
* @private
166154
*/
167155
cwc.mode.sphero.classic.Connection.prototype.handleConnecting_ = function(e) {

src/protocol/low-level/tcp/http_server.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ cwc.protocol.tcp.HTTPServer.prototype.unlisten = function() {
115115

116116
/**
117117
* @param {!string} path
118-
* @param {!function} handler
118+
* @param {!Function} handler
119119
*/
120120
cwc.protocol.tcp.HTTPServer.prototype.addCustomHandler = function(path,
121121
handler) {
@@ -174,21 +174,23 @@ cwc.protocol.tcp.HTTPServer.prototype.getRootURL = function() {
174174
* Close tcp server.
175175
*/
176176
cwc.protocol.tcp.HTTPServer.prototype.close = function() {
177-
this.closeSocket_(this.socketId_);
178-
this.unlisten();
177+
if (this.socketId_ !== null) {
178+
this.closeSocket_(this.socketId_);
179+
this.unlisten();
180+
}
179181
};
180182

181183

182184
/**
183185
* HTTP response handler
184186
* @param {!string} content
185-
* @param {Object=} options
186-
* @param {number=} clientSocketId
187+
* @param {!number} clientSocketId
187188
* @param {string=} requestPath
189+
* @param {Object=} options
188190
* @private
189191
*/
190192
cwc.protocol.tcp.HTTPServer.prototype.httpResponse_ = function(content,
191-
options = {}, clientSocketId, requestPath = '') {
193+
clientSocketId, requestPath = '', options = {}) {
192194
if (chrome.runtime.lastError) {
193195
this.log_.error('Unable to send http response: ',
194196
chrome.runtime.lastError.message);
@@ -359,7 +361,7 @@ cwc.protocol.tcp.HTTPServer.prototype.handleRecieve_ = function(receiveInfo) {
359361
}
360362
let httpResponse = function(content = '', options = {}) {
361363
this.httpResponse_(
362-
content, options, receiveInfo['socketId'], requestPath);
364+
content, receiveInfo['socketId'], requestPath, options);
363365
}.bind(this);
364366
this.log_.info('GET', requestPath, requestParameter);
365367
if (requestPath === '/') {

src/protocol/robots/sphero/classic/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cwc.protocol.sphero.classic.Api = function() {
7575
/** @private {!number} */
7676
this.locationSpeed_ = 0;
7777

78-
/** @type {goog.events.EventTarget} */
78+
/** @type {!goog.events.EventTarget} */
7979
this.eventHandler = new goog.events.EventTarget();
8080

8181
/** @private {!cwc.utils.Events} */
@@ -200,7 +200,7 @@ cwc.protocol.sphero.classic.Api.prototype.monitor = function(enable) {
200200

201201

202202
/**
203-
* @return {goog.events.EventTarget}
203+
* @return {!goog.events.EventTarget}
204204
*/
205205
cwc.protocol.sphero.classic.Api.prototype.getEventHandler = function() {
206206
return this.eventHandler;

src/renderer/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ cwc.renderer.Helper.prototype.getHTMLGrid = function(body, header, css,
136136
/**
137137
* @param {string=} body
138138
* @param {string=} header
139-
* @param {object=} environ
139+
* @param {Object=} environ
140140
* @return {!string}
141141
*/
142142
cwc.renderer.Helper.prototype.getHTMLRunner = function(body, header,

src/runner/runnerConnector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ cwc.runner.Connector.prototype.addApiProfile = function(api) {
171171

172172
/**
173173
* @param {!string} name
174-
* @param {!function(?)} func
174+
* @param {!function(Object, string)} func
175175
* @param {?=} scope
176176
* @export
177177
*/

src/ui/layout/layout.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ cwc.ui.Layout.prototype.getEventHandler = function() {
374374
* Adjusts the main UI element to fullscreen.
375375
* @param {!boolean} fullscreen
376376
* @param {!boolean} editorMode
377-
* @param {number=} size
378377
*/
379378
cwc.ui.Layout.prototype.setFullscreen_ = function(fullscreen,
380379
editorMode = false) {

src/ui/preview/preview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ cwc.ui.Preview.prototype.decorate = function(node) {
165165
// Infobar
166166
let nodeInfobar = goog.dom.getElement(this.prefix + 'infobar');
167167
if (nodeInfobar) {
168-
this.infobar = new cwc.ui.PreviewInfobar(this.helper).
169-
decorate(nodeInfobar);
168+
this.infobar = new cwc.ui.PreviewInfobar(this.helper);
169+
this.infobar.decorate(nodeInfobar);
170170
}
171171

172172
// Monitor Changes

0 commit comments

Comments
 (0)