Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Apr 28, 2017
1 parent c0ddc60 commit e5de178
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 30 deletions.
54 changes: 27 additions & 27 deletions closure.log
Original file line number Diff line number Diff line change
Expand Up @@ -756,128 +756,128 @@ Found : $polymer_html_script_26$classdecl$var2<|function(new:$polymer_html_sc
mutableData: this.mutableData,
^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:354: WARNING - Property __dataHost never defined on this of type DomRepeat
/polymer.html_script_30.js:363: WARNING - Property __dataHost never defined on this of type DomRepeat
return this.__dataHost._methodHost || this.__dataHost;
^^^^^^^^^^^^^^^

/polymer.html_script_30.js:363: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:372: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__render);
^^^^^^^^^^^^^

/polymer.html_script_30.js:373: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:382: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__render);
^^^^^^^^^^^^^

/polymer.html_script_30.js:393: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:402: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__requestRenderChunk);
^^^^^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:406: WARNING - Property _targetFrameTime never defined on this of type DomRepeat
/polymer.html_script_30.js:415: WARNING - Property _targetFrameTime never defined on this of type DomRepeat
let ratio = this._targetFrameTime / (currChunkTime - this.__lastChunkTime);
^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:410: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:419: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__render);
^^^^^^^^^^^^^

/polymer.html_script_30.js:429: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:438: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__render);
^^^^^^^^^^^^^

/polymer.html_script_30.js:440: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:449: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__render, this.delay);
^^^^^^^^^^^^^

/polymer.html_script_30.js:440: WARNING - Property delay never defined on this of type DomRepeat{__needFullRefresh:boolean, __observePaths:truthy}
/polymer.html_script_30.js:449: WARNING - Property delay never defined on this of type DomRepeat{__needFullRefresh:boolean, __observePaths:truthy}
this.__debounceRender(this.__render, this.delay);
^^^^^^^^^^

/polymer.html_script_30.js:454: WARNING - Invalid type for parameter 1 of function Polymer.Async.timeOut.after.
/polymer.html_script_30.js:463: WARNING - Invalid type for parameter 1 of function Polymer.Async.timeOut.after.
Expected : number
Found : number|undefined
More details:
The found type is a union that includes an unexpected type: undefined
, delay > 0 ? Polymer.Async.timeOut.after(delay) : Polymer.Async.microTask
^^^^^

/polymer.html_script_30.js:469: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
/polymer.html_script_30.js:478: WARNING - Invalid type for parameter 1 of function this.__debounceRender.
Expected : function():?
Found : function(this:DomRepeat):?

this.__debounceRender(this.__render);
^^^^^^^^^^^^^

/polymer.html_script_30.js:486: WARNING - Property _setRenderedItemCount never defined on this of type DomRepeat{__pool:{length:number} (loose)}
/polymer.html_script_30.js:495: WARNING - Property _setRenderedItemCount never defined on this of type DomRepeat{__pool:{length:number} (loose)}
this._setRenderedItemCount(this.__instances.length);
^^^^^^^^^^^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:522: WARNING - Property as never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
/polymer.html_script_30.js:531: WARNING - Property as never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
inst._setPendingProperty(this.as, item);
^^^^^^^

/polymer.html_script_30.js:523: WARNING - Property indexAs never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
/polymer.html_script_30.js:532: WARNING - Property indexAs never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
inst._setPendingProperty(this.indexAs, instIdx);
^^^^^^^^^^^^

/polymer.html_script_30.js:524: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
/polymer.html_script_30.js:533: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object{}, __limit:number, items:?=}
inst._setPendingProperty(this.itemsIndexAs, itemIdx);
^^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:560: WARNING - Property as never defined on this of type DomRepeat
/polymer.html_script_30.js:569: WARNING - Property as never defined on this of type DomRepeat
model[this.as] = item;
^^^^^^^

/polymer.html_script_30.js:561: WARNING - Property indexAs never defined on this of type DomRepeat
/polymer.html_script_30.js:570: WARNING - Property indexAs never defined on this of type DomRepeat
model[this.indexAs] = instIdx;
^^^^^^^^^^^^

/polymer.html_script_30.js:562: WARNING - Property itemsIndexAs never defined on this of type DomRepeat
/polymer.html_script_30.js:571: WARNING - Property itemsIndexAs never defined on this of type DomRepeat
model[this.itemsIndexAs] = itemIdx;
^^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:571: WARNING - Property as never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
/polymer.html_script_30.js:580: WARNING - Property as never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
inst._setPendingProperty(this.as, item);
^^^^^^^

/polymer.html_script_30.js:572: WARNING - Property indexAs never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
/polymer.html_script_30.js:581: WARNING - Property indexAs never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
inst._setPendingProperty(this.indexAs, instIdx);
^^^^^^^^^^^^

/polymer.html_script_30.js:573: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
/polymer.html_script_30.js:582: WARNING - Property itemsIndexAs never defined on this of type DomRepeat{__pool:{pop:LOOSE_TOP_FUNCTION} (loose)}
inst._setPendingProperty(this.itemsIndexAs, itemIdx);
^^^^^^^^^^^^^^^^^

/polymer.html_script_30.js:607: WARNING - Property as never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object}
/polymer.html_script_30.js:616: WARNING - Property as never defined on this of type DomRepeat{__instances:Object, __itemsIdxToInstIdx:Object}
let itemPath = this.as + (itemSubPath ? '.' + itemSubPath : '');
^^^^^^^

/polymer.html_script_30.js:631: WARNING - Property as never defined on this of type DomRepeat
/polymer.html_script_30.js:640: WARNING - Property as never defined on this of type DomRepeat
return instance && instance[this.as];
^^^^^^^

/polymer.html_script_30.js:645: WARNING - Property indexAs never defined on this of type DomRepeat
/polymer.html_script_30.js:654: WARNING - Property indexAs never defined on this of type DomRepeat
return instance && instance[this.indexAs];
^^^^^^^^^^^^

/polymer.html_script_30.js:666: WARNING - Property template never defined on this of type DomRepeat
/polymer.html_script_30.js:675: WARNING - Property template never defined on this of type DomRepeat
return Polymer.Templatize.modelForElement(this.template, el);
^^^^^^^^^^^^^

Expand All @@ -893,11 +893,11 @@ Found : function(this:DomRepeat):?
this.__ctor = Polymer.Templatize.templatize(template, this, {
^^^^^^^^^^^

/polymer.html_script_31.js:215: WARNING - Property __dataHost never defined on this of type DomIf{__instance:{_setPendingProperty:LOOSE_TOP_FUNCTION} (loose)}
/polymer.html_script_31.js:219: WARNING - Property __dataHost never defined on this of type DomIf{__instance:{_setPendingProperty:LOOSE_TOP_FUNCTION} (loose)}
this.__instance._setPendingProperty(prop, this.__dataHost[prop]);
^^^^^^^^^^^^^^^

/polymer.html_script_31.js:238: WARNING - Property if never defined on this of type DomIf
/polymer.html_script_31.js:242: WARNING - Property if never defined on this of type DomIf
let hidden = this.__hideTemplateChildren__ || !this.if;
^^^^^^^

Expand Down
6 changes: 5 additions & 1 deletion lib/elements/dom-if.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
// dom-if templatizer instances require `mutable: true`, as
// `__syncHostProperties` relies on that behavior to sync objects
mutableData: true,
/** @this {this} */
/**
* @param {string} prop Property to forward
* @param {*} value Value of property
* @this {this}
*/
forwardHostProp: function(prop, value) {
if (this.__instance) {
if (this.if) {
Expand Down
13 changes: 11 additions & 2 deletions lib/elements/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,23 @@
mutableData: this.mutableData,
parentModel: true,
instanceProps: instanceProps,
/** @this {this} */
/**
* @this {this}
* @param {string} prop Property to set
* @param {*} value Value to set property to
*/
forwardHostProp: function(prop, value) {
let i$ = this.__instances;
for (let i=0, inst; (i<i$.length) && (inst=i$[i]); i++) {
inst.forwardHostProp(prop, value);
}
},
/** @this {this} */
/**
* @this {this}
* @param {Object} inst Instance to notify
* @param {string} prop Property to notify
* @param {*} value Value to notify
*/
notifyInstanceProp: function(inst, prop, value) {
if (Polymer.Path.matches(this.as, prop)) {
let idx = inst[this.itemsIndexAs];
Expand Down

0 comments on commit e5de178

Please sign in to comment.