Skip to content

Commit

Permalink
Fix more closure warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Apr 27, 2017
1 parent 0b22959 commit b686cd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 39 deletions.
28 changes: 2 additions & 26 deletions closure.log
Original file line number Diff line number Diff line change
Expand Up @@ -725,31 +725,7 @@ Found : PolymerElement
this.registrations.forEach(this._regLog);
^^^^

/polymer.html_script_12.js:81: WARNING - Type annotation references non-existent type Polymer.Debouncer.
* @param {Polymer.Debouncer?} debouncer Debouncer object.
^^^^^^^^^^^^^^^^^

/polymer.html_script_21.js:189: WARNING - Dangerous use of the global THIS object
return this.node[method].apply(this.node, arguments);
^^^^

/polymer.html_script_21.js:189: WARNING - Dangerous use of the global THIS object
return this.node[method].apply(this.node, arguments);
^^^^

/polymer.html_script_21.js:203: WARNING - Dangerous use of the global THIS object
return this.node[name];
^^^^

/polymer.html_script_21.js:215: WARNING - Dangerous use of the global THIS object
return this.node[name];
^^^^

/polymer.html_script_21.js:218: WARNING - Dangerous use of the global THIS object
this.node[name] = value;
^^^^

/polymer.html_script_21.js:339: WARNING - Property polyfillWrapFlushCallback never defined on window.customElements of type CustomElementRegistry
/polymer.html_script_21.js:331: WARNING - Property polyfillWrapFlushCallback never defined on window.customElements of type CustomElementRegistry
!(window.customElements.polyfillWrapFlushCallback);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -1439,4 +1415,4 @@ externs/closure-types.js:759: WARNING - property toggle on interface Polymer_Arr
Polymer_ArraySelectorMixin.prototype.toggle;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 error(s), 315 warning(s), 72.6% typed
0 error(s), 309 warning(s), 72.6% typed
16 changes: 4 additions & 12 deletions lib/legacy/polymer.dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,7 @@
function forwardMethods(proto, methods) {
for (let i=0; i < methods.length; i++) {
let method = methods[i];
/**
* @this {DomApi}
* @return {*} Returns method value
*/
proto[method] = function() {
proto[method] = /** @this {DomApi} */ function() {
return this.node[method].apply(this.node, arguments);
}
}
Expand All @@ -207,12 +203,8 @@
for (let i=0; i < properties.length; i++) {
let name = properties[i];
Object.defineProperty(proto, name, {
/**
* @this {DomApi}
* @return {*} Returns property value
*/
get: function() {
return this.node[name];
return /** @type {DomApi} */ (this).node[name];
},
configurable: true
});
Expand All @@ -224,10 +216,10 @@
let name = properties[i];
Object.defineProperty(proto, name, {
get: function() {
return this.node[name];
return /** @type {DomApi} */ (this).node[name];
},
set: function(value) {
this.node[name] = value;
/** @type {DomApi} */ (this).node[name] = value;
},
configurable: true
});
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/debounce.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
* `_debounceWork` method. Then in a test, call `Polymer.flush` to ensure
* the debouncer has completed.
*
* @param {Polymer.Debouncer?} debouncer Debouncer object.
* @param {Debouncer?} debouncer Debouncer object.
* @param {!AsyncModule} asyncModule Object with Async interface
* @param {function()} callback Callback to run.
* @return {!Debouncer} Returns a debouncer object.
Expand Down

0 comments on commit b686cd7

Please sign in to comment.