diff --git a/closure.log b/closure.log index 2f1214451c..4c508ec48e 100644 --- a/closure.log +++ b/closure.log @@ -756,61 +756,61 @@ 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: @@ -818,66 +818,66 @@ 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); ^^^^^^^^^^^^^ @@ -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; ^^^^^^^ diff --git a/lib/elements/dom-if.html b/lib/elements/dom-if.html index fbf6707e03..1d4dd3fb07 100644 --- a/lib/elements/dom-if.html +++ b/lib/elements/dom-if.html @@ -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) { diff --git a/lib/elements/dom-repeat.html b/lib/elements/dom-repeat.html index f93d23fa73..f36b7f4e90 100644 --- a/lib/elements/dom-repeat.html +++ b/lib/elements/dom-repeat.html @@ -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