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 b3dfd38 commit 2627e63
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
16 changes: 2 additions & 14 deletions closure.log
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,7 @@ Found : PropertyEffects
klass.observers : [];
^^^^^^^^^^^^^^^

/polymer.html_script_11.js:155: WARNING - Type annotation references non-existent type Objecg.
* @return {Objecg} The input `flattenedProps` bag
^^^^^^

/polymer.html_script_11.js:184: WARNING - Property prototype never defined on klass of type HTMLElement{__classProperties:?}
/polymer.html_script_11.js:184: WARNING - Property prototype never defined on klass of type HTMLElement{__classProperties:Object|null}
let superCtor = Object.getPrototypeOf(klass.prototype).constructor;
^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -761,14 +757,6 @@ Found : PolymerElement
return this.splice(arrayOrPath, index, 1);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_23.js:49: WARNING - Invalid type for parameter 1 of function _mixinBehaviors.
Expected : {length:?} (loose)
Found : Array<?>|null
More details:
The found type is a union that includes an unexpected type: null
klass = _mixinBehaviors(behaviors, klass);
^^^^^^^^^

/polymer.html_script_23.js:141: WARNING - Property is never defined on this of type PolymerGenerated
Polymer.DomModule.import(this.is, 'template') ||
^^^^^^^
Expand Down Expand Up @@ -1495,4 +1483,4 @@ externs/closure-types.js:759: WARNING - property toggle on interface Polymer_Arr
Polymer_ArraySelectorMixin.prototype.toggle;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 error(s), 328 warning(s), 72.6% typed
0 error(s), 326 warning(s), 72.6% typed
4 changes: 2 additions & 2 deletions lib/legacy/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* to ensure that any legacy behaviors can rely on legacy Polymer API on
* the underlying element.
*
* @param {Object|Array} behaviors Behavior object or array of behaviors.
* @param {!(Object|Array)} behaviors Behavior object or array of behaviors.
* @param {HTMLElement} klass Element class.
* @return {HTMLElement} Returns a new Element class extended by the
* passed in `behaviors` and also by `Polymer.LegacyElementMixin`.
Expand Down Expand Up @@ -110,7 +110,7 @@
* @param {Array} behaviors List of behaviors to flatten.
* @param {Array=} list Target list to flatten behaviors into.
* @param {Array=} exclude List of behaviors to exclude from the list.
* @return {Array} Returns the list of flattened behaviors.
* @return {!Array} Returns the list of flattened behaviors.
*/
function flattenBehaviors(behaviors, list, exclude) {
list = list || [];
Expand Down
4 changes: 2 additions & 2 deletions lib/legacy/legacy-element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@

/**
* @constructor
* @extends {base}
* @implements {Polymer_GestureEventListeners}
* @implements {Polymer_ElementMixin}
* @implements {Polymer_GestureEventListeners}
* @extends {base}
*/
const legacyElementBase = Polymer.GestureEventListeners(Polymer.ElementMixin(base));

Expand Down
2 changes: 1 addition & 1 deletion lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
*
* @param {Object} flattenedProps Bag to collect flattened properties into
* @param {Object} props Bag of properties to add to `flattenedProps`
* @return {Objecg} The input `flattenedProps` bag
* @return {Object} The input `flattenedProps` bag
* @private
*/
function flattenProperties(flattenedProps, props) {
Expand Down

0 comments on commit 2627e63

Please sign in to comment.