From abc229e5521bb30a7cd65940b30250795c0f53dd Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Wed, 31 May 2017 16:26:02 -0700 Subject: [PATCH] rebaseline warnings with NTI specific warnings disabled, for now --- closure.log | 848 +++++---------------------- externs/closure-types.js | 68 +-- gulpfile.js | 2 + lib/legacy/legacy-element-mixin.html | 8 +- lib/mixins/element-mixin.html | 19 +- lib/mixins/property-effects.html | 19 +- lib/utils/mixin.html | 1 + lib/utils/path.html | 1 + package.json | 2 +- 9 files changed, 225 insertions(+), 743 deletions(-) diff --git a/closure.log b/closure.log index da937ea6f1..6a95c684de 100644 --- a/closure.log +++ b/closure.log @@ -1,230 +1,63 @@ -gulp-google-closure-compiler: /polymer.html_script_0.js:20: WARNING - Returned type does not match declared return type. -Expected : Object|null -Found : undefined +gulp-google-closure-compiler: externs/closure-types.js:780: WARNING - property connectedCallback not defined on any supertype of Polymer_ElementMixin +Polymer_ElementMixin.prototype.connectedCallback = function(){}; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - return window.Polymer._polymerFn(info); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +externs/closure-types.js:784: WARNING - property disconnectedCallback not defined on any supertype of Polymer_ElementMixin +Polymer_ElementMixin.prototype.disconnectedCallback = function(){}; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_1.js:59: WARNING - invalid cast - the types do not have a common subtype -from: function(?=):? -to : T - return /** @type {T} */(dedupingMixin); - ^^^^^^^^^^^^^^^ +externs/closure-types.js:1435: WARNING - property mutableData on interface Polymer_OptionalMutableData is not implemented by type OptionalMutableData +Polymer_OptionalMutableData.prototype.mutableData; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +externs/closure-types.js:1449: WARNING - property items on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin +Polymer_ArraySelectorMixin.prototype.items; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +externs/closure-types.js:1452: WARNING - property multi on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin +Polymer_ArraySelectorMixin.prototype.multi; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:144: WARNING - Property name never defined on trigger of type Object - let triggerPath = trigger.name; - ^^^^^^^^^^^^ +externs/closure-types.js:1455: WARNING - property selected on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin +Polymer_ArraySelectorMixin.prototype.selected; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:168: WARNING - Property property never defined on info of type {methodName:?} - let changedProp = info.property; - ^^^^^^^^^^^^^ +externs/closure-types.js:1458: WARNING - property selectedItem on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin +Polymer_ArraySelectorMixin.prototype.selectedItem; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:170: WARNING - Property __data never defined on inst of type Object - fn.call(inst, inst.__data[changedProp], oldProps[changedProp]); - ^^^^^^^^^^^ +externs/closure-types.js:1461: WARNING - property toggle on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin +Polymer_ArraySelectorMixin.prototype.toggle; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:195: WARNING - Property __notifyEffects never defined on inst of type Element +polymer.html_script_10.js:195: WARNING - Property __notifyEffects never defined on inst of type Element let fxs = inst.__notifyEffects; ^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:225: WARNING - Missing return statement. Function expected to return boolean. +polymer.html_script_10.js:227: WARNING - Missing return statement. Function expected to return boolean. function notifyPath(inst, path, props) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:273: WARNING - Property __data never defined on inst of type Element - let value = path ? Polymer.Path.get(inst, path) : inst.__data[property]; - ^^^^^^^^^^^ - -/polymer.html_script_10.js:308: WARNING - Property _setPendingPropertyOrPath never defined on inst of type Object - if (inst._setPendingPropertyOrPath(toPath, value, true, Boolean(fromPath)) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:310: WARNING - Property _invalidateProperties never defined on inst of type Object - inst._invalidateProperties(); - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:332: WARNING - Property _propertyToAttribute never defined on inst of type {__data:Object} - inst._propertyToAttribute(property, info.attrName, value); - ^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:352: WARNING - Property __computeEffects never defined on inst of type Element +polymer.html_script_10.js:354: WARNING - Property __computeEffects never defined on inst of type Element let computeEffects = inst.__computeEffects; ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:356: WARNING - Invalid type for parameter 1 of function Object.assign. -Expected : Object -Found : Object|null -More details: -The found type is a union that includes an unexpected type: null - Object.assign(oldProps, inst.__dataOld); - ^^^^^^^^ - -/polymer.html_script_10.js:356: WARNING - Property __dataOld never defined on inst of type Element - Object.assign(oldProps, inst.__dataOld); - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:357: WARNING - Invalid type for parameter 1 of function Object.assign. -Expected : Object -Found : Object|null -More details: -The found type is a union that includes an unexpected type: null - Object.assign(changedProps, inst.__dataPending); - ^^^^^^^^^^^^ - -/polymer.html_script_10.js:396: WARNING - Property __dataLinkedPaths never defined on inst of type Element +polymer.html_script_10.js:398: WARNING - Property __dataLinkedPaths never defined on inst of type Element let links = inst.__dataLinkedPaths; ^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:403: WARNING - Property _setPendingPropertyOrPath never defined on inst of type Element - inst._setPendingPropertyOrPath(link, value, true, true); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:406: WARNING - Property _setPendingPropertyOrPath never defined on inst of type Element - inst._setPendingPropertyOrPath(link, value, true, true); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:437: WARNING - Property negate never defined on $jscomp$destructuring$var0 of type {event:?} - let {event, negate} = binding.parts[0]; - ^^^^^^ - -/polymer.html_script_10.js:463: WARNING - Property target never defined on binding of type {kind:string} - if (binding.kind === 'attribute' && binding.target[0] === '-') { - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:464: WARNING - Property target never defined on binding of type {kind:string} - console.warn('Cannot set attribute ' + binding.target + - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:467: WARNING - Property dependencies never defined on part of type Object - let dependencies = part.dependencies; - ^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:505: WARNING - Property binding never defined on info of type {index:number} - let binding = info.binding; - ^^^^^^^^^^^^ - -/polymer.html_script_10.js:506: WARNING - Property part never defined on info of type {index:number} - let part = info.part; - ^^^^^^^^^ - -/polymer.html_script_10.js:515: WARNING - Property _enqueueClient never defined on inst of type Element - inst._enqueueClient(node); - ^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:518: WARNING - Property evaluator never defined on info of type {index:number} - let value = info.evaluator._evaluateBinding(inst, part, path, props, oldProps, hasPaths); - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:538: WARNING - Property kind never defined on binding of type {target:string} - value = Polymer.sanitizeDOMValue(value, binding.target, binding.kind, node); - ^^^^^^^^^^^^ - -/polymer.html_script_10.js:542: WARNING - Property target never defined on binding of type {kind:?} - inst._valueToNodeAttribute(node, value, binding.target); - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:545: WARNING - Property target never defined on binding of type {kind:?} - let prop = binding.target; - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:575: WARNING - Property kind never defined on binding of type Object - if (binding.kind !== 'attribute') { - ^^^^^^^^^^^^ - -/polymer.html_script_10.js:577: WARNING - Property target never defined on binding of type Object - if (binding.target === 'textContent' || - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:578: WARNING - Property target never defined on binding of type Object - (node.localName == 'input' && binding.target == 'value')) { - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:616: WARNING - Property nodeInfoList never defined on $jscomp$destructuring$var1 of type {nodeList:?} - let {nodeList, nodeInfoList} = templateInfo; - ^^^^^^^^^^^^ - -/polymer.html_script_10.js:703: WARNING - Property methodName never defined on sig of type Object - let dynamicFn = sig.static || dynamicFns && dynamicFns[sig.methodName]; - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:705: WARNING - Property methodName never defined on sig of type Object - methodName: sig.methodName, - ^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:706: WARNING - Property args never defined on sig of type Object - args: sig.args, - ^^^^^^^^ - -/polymer.html_script_10.js:710: WARNING - Property args never defined on sig of type Object - for (let i=0, arg; (i|string More details: @@ -232,581 +65,328 @@ The found type is a union that includes an unexpected type: Array computeLinkedPaths(this, path, value); ^^^^ -/polymer.html_script_10.js:1358: WARNING - Missing return statement. Function expected to return boolean. - _setPendingProperty(property, value, shouldNotify) { - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:1520: WARNING - Invalid type for parameter 1 of function runComputedEffects. +polymer.html_script_10.js:1534: WARNING - Invalid type for parameter 1 of function runComputedEffects. Expected : Element|null -Found : PropertyEffects{__dataHasPaths:boolean} +Found : PropertyEffects{__dataHasPaths:false} runComputedEffects(this, changedProps, oldProps, hasPaths); ^^^^ -/polymer.html_script_10.js:1520: WARNING - Invalid type for parameter 2 of function runComputedEffects. -Expected : Object|null +polymer.html_script_10.js:1534: WARNING - Invalid type for parameter 2 of function runComputedEffects. +Expected : Object Found : * runComputedEffects(this, changedProps, oldProps, hasPaths); ^^^^^^^^^^^^ -/polymer.html_script_10.js:1520: WARNING - Invalid type for parameter 3 of function runComputedEffects. -Expected : Object|null +polymer.html_script_10.js:1534: WARNING - Invalid type for parameter 3 of function runComputedEffects. +Expected : Object Found : * runComputedEffects(this, changedProps, oldProps, hasPaths); ^^^^^^^^ -/polymer.html_script_10.js:1526: WARNING - Invalid type for parameter 1 of function this._propagatePropertyChanges. +polymer.html_script_10.js:1540: WARNING - Invalid type for parameter 1 of function this._propagatePropertyChanges. Expected : Object|null Found : * this._propagatePropertyChanges(changedProps, oldProps, hasPaths); ^^^^^^^^^^^^ -/polymer.html_script_10.js:1526: WARNING - Invalid type for parameter 2 of function this._propagatePropertyChanges. +polymer.html_script_10.js:1540: WARNING - Invalid type for parameter 2 of function this._propagatePropertyChanges. Expected : Object|null Found : * this._propagatePropertyChanges(changedProps, oldProps, hasPaths); ^^^^^^^^ -/polymer.html_script_10.js:1530: WARNING - Property __reflectEffects never defined on this of type PropertyEffects{__dataHasPaths:boolean, __dataToNotify:null} +polymer.html_script_10.js:1544: WARNING - Property __reflectEffects never defined on this of type PropertyEffects{__dataHasPaths:false, __dataToNotify:null} runEffects(this, this.__reflectEffects, changedProps, oldProps, hasPaths); ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:1530: WARNING - Invalid type for parameter 3 of function runEffects. +polymer.html_script_10.js:1544: WARNING - Invalid type for parameter 3 of function runEffects. Expected : Object|null Found : * runEffects(this, this.__reflectEffects, changedProps, oldProps, hasPaths); ^^^^^^^^^^^^ -/polymer.html_script_10.js:1530: WARNING - Invalid type for parameter 4 of function runEffects. +polymer.html_script_10.js:1544: WARNING - Invalid type for parameter 4 of function runEffects. Expected : Object|null|undefined Found : * runEffects(this, this.__reflectEffects, changedProps, oldProps, hasPaths); ^^^^^^^^ -/polymer.html_script_10.js:1532: WARNING - Property __observeEffects never defined on this of type PropertyEffects{__dataHasPaths:boolean, __dataToNotify:null} +polymer.html_script_10.js:1546: WARNING - Property __observeEffects never defined on this of type PropertyEffects{__dataHasPaths:false, __dataToNotify:null} runEffects(this, this.__observeEffects, changedProps, oldProps, hasPaths); ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:1532: WARNING - Invalid type for parameter 3 of function runEffects. +polymer.html_script_10.js:1546: WARNING - Invalid type for parameter 3 of function runEffects. Expected : Object|null Found : * runEffects(this, this.__observeEffects, changedProps, oldProps, hasPaths); ^^^^^^^^^^^^ -/polymer.html_script_10.js:1532: WARNING - Invalid type for parameter 4 of function runEffects. +polymer.html_script_10.js:1546: WARNING - Invalid type for parameter 4 of function runEffects. Expected : Object|null|undefined Found : * runEffects(this, this.__observeEffects, changedProps, oldProps, hasPaths); ^^^^^^^^ -/polymer.html_script_10.js:1535: WARNING - Invalid type for parameter 1 of function runNotifyEffects. +polymer.html_script_10.js:1549: WARNING - Invalid type for parameter 1 of function runNotifyEffects. Expected : Element|null -Found : PropertyEffects{__dataHasPaths:boolean, __dataToNotify:null} +Found : PropertyEffects{__dataHasPaths:false, __dataToNotify:null} runNotifyEffects(this, notifyProps, changedProps, oldProps, hasPaths); ^^^^ -/polymer.html_script_10.js:1535: WARNING - Invalid type for parameter 3 of function runNotifyEffects. +polymer.html_script_10.js:1549: WARNING - Invalid type for parameter 3 of function runNotifyEffects. Expected : Object|null Found : * runNotifyEffects(this, notifyProps, changedProps, oldProps, hasPaths); ^^^^^^^^^^^^ -/polymer.html_script_10.js:1535: WARNING - Invalid type for parameter 4 of function runNotifyEffects. +polymer.html_script_10.js:1549: WARNING - Invalid type for parameter 4 of function runNotifyEffects. Expected : Object|null Found : * runNotifyEffects(this, notifyProps, changedProps, oldProps, hasPaths); ^^^^^^^^ -/polymer.html_script_10.js:1538: WARNING - Property __dataCounter never defined on this of type PropertyEffects{__dataHasPaths:boolean, __dataToNotify:null} +polymer.html_script_10.js:1552: WARNING - Property __dataCounter never defined on this of type PropertyEffects{__dataHasPaths:false, __dataToNotify:null} if (this.__dataCounter == 1) { ^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:1630: WARNING - Invalid type for parameter 1 of function notifySplices. +polymer.html_script_10.js:1644: WARNING - Invalid type for parameter 1 of function notifySplices. Expected : Element|null Found : PropertyEffects notifySplices(this, array, info.path, splices); ^^^^ -/polymer.html_script_10.js:1630: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1644: WARNING - Property path never defined on info of type Object{} notifySplices(this, array, info.path, splices); ^^^^^^^^^ -/polymer.html_script_10.js:1708: WARNING - Invalid type for parameter 1 of function notifySplice. +polymer.html_script_10.js:1722: WARNING - Invalid type for parameter 1 of function notifySplice. Expected : Element|null Found : PropertyEffects notifySplice(this, array, info.path, len, items.length, []); ^^^^ -/polymer.html_script_10.js:1708: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1722: WARNING - Property path never defined on info of type Object{} notifySplice(this, array, info.path, len, items.length, []); ^^^^^^^^^ -/polymer.html_script_10.js:1732: WARNING - Invalid type for parameter 1 of function notifySplice. +polymer.html_script_10.js:1746: WARNING - Invalid type for parameter 1 of function notifySplice. Expected : Element|null Found : PropertyEffects notifySplice(this, array, info.path, array.length, 0, [ret]); ^^^^ -/polymer.html_script_10.js:1732: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1746: WARNING - Property path never defined on info of type Object{} notifySplice(this, array, info.path, array.length, 0, [ret]); ^^^^^^^^^ -/polymer.html_script_10.js:1768: WARNING - Invalid type for parameter 1 of function notifySplice. +polymer.html_script_10.js:1782: WARNING - Invalid type for parameter 1 of function notifySplice. Expected : Element|null Found : PropertyEffects notifySplice(this, array, info.path, start, items.length, ret); ^^^^ -/polymer.html_script_10.js:1768: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1782: WARNING - Property path never defined on info of type Object{} notifySplice(this, array, info.path, start, items.length, ret); ^^^^^^^^^ -/polymer.html_script_10.js:1792: WARNING - Invalid type for parameter 1 of function notifySplice. +polymer.html_script_10.js:1806: WARNING - Invalid type for parameter 1 of function notifySplice. Expected : Element|null Found : PropertyEffects notifySplice(this, array, info.path, 0, 0, [ret]); ^^^^ -/polymer.html_script_10.js:1792: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1806: WARNING - Property path never defined on info of type Object{} notifySplice(this, array, info.path, 0, 0, [ret]); ^^^^^^^^^ -/polymer.html_script_10.js:1816: WARNING - Invalid type for parameter 1 of function notifySplice. +polymer.html_script_10.js:1830: WARNING - Invalid type for parameter 1 of function notifySplice. Expected : Element|null Found : PropertyEffects notifySplice(this, array, info.path, 0, items.length, []); ^^^^ -/polymer.html_script_10.js:1816: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1830: WARNING - Property path never defined on info of type Object{} notifySplice(this, array, info.path, 0, items.length, []); ^^^^^^^^^ -/polymer.html_script_10.js:1840: WARNING - Property path never defined on info of type Object{} +polymer.html_script_10.js:1854: WARNING - Property path never defined on info of type Object{} propPath = info.path; ^^^^^^^^^ -/polymer.html_script_10.js:2069: WARNING - Property nodeList never defined on dom of type DocumentFragment +polymer.html_script_10.js:2226: WARNING - Property nodeList never defined on dom of type DocumentFragment templateInfo.nodeList = dom.nodeList; ^^^^^^^^^^^^ -/polymer.html_script_10.js:2082: WARNING - Property propertyEffects never defined on templateInfo of type {childNodes:Array=, nodeList:?, wasPreBound:truthy=} - runEffects(this, templateInfo.propertyEffects, this.__data, null, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:2098: WARNING - Property templateInfo never defined on dom of type DocumentFragment +polymer.html_script_10.js:2255: WARNING - Property templateInfo never defined on dom of type DocumentFragment let templateInfo = dom.templateInfo; ^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2132: WARNING - Property _parseTemplateNode never defined on propertyEffectsBase of type propertyEffectsBase<|function(new:propertyEffectsBase):?|> +polymer.html_script_10.js:2293: WARNING - Property _parseTemplateNode never defined on propertyEffectsBase of type propertyEffectsBase<|function(new:propertyEffectsBase):?|> let noted = super._parseTemplateNode(node, templateInfo, nodeInfo); ^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2140: WARNING - Function addBinding: called with 6 argument(s). Function requires at least 7 argument(s) and at most 7. +polymer.html_script_10.js:2301: WARNING - Function addBinding: called with 6 argument(s). Function requires at least 7 argument(s) and at most 7. addBinding(this, templateInfo, nodeInfo, 'text', 'textContent', parts); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2176: WARNING - Property setAttribute never defined on node of type Node - node.setAttribute(name, literal); - ^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:2183: WARNING - Property setAttribute never defined on node of type Node - node.setAttribute(origName, ''); - ^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:2186: WARNING - Property removeAttribute never defined on node of type Node - node.removeAttribute(origName); - ^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_10.js:2197: WARNING - Property _parseTemplateNodeAttribute never defined on propertyEffectsBase of type propertyEffectsBase<|function(new:propertyEffectsBase):?|> +polymer.html_script_10.js:2358: WARNING - Property _parseTemplateNodeAttribute never defined on propertyEffectsBase of type propertyEffectsBase<|function(new:propertyEffectsBase):?|> return super._parseTemplateNodeAttribute(node, templateInfo, nodeInfo, name, value); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2215: WARNING - Property _parseTemplateNestedTemplate never defined on propertyEffectsBase of type propertyEffectsBase<|function(new:propertyEffectsBase):?|> +polymer.html_script_10.js:2376: WARNING - Property _parseTemplateNestedTemplate never defined on propertyEffectsBase of type propertyEffectsBase<|function(new:propertyEffectsBase):?|> let noted = super._parseTemplateNestedTemplate(node, templateInfo, nodeInfo); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2221: WARNING - Function addBinding: called with 6 argument(s). Function requires at least 7 argument(s) and at most 7. +polymer.html_script_10.js:2382: WARNING - Function addBinding: called with 6 argument(s). Function requires at least 7 argument(s) and at most 7. addBinding(this, templateInfo, nodeInfo, 'property', '_host_' + source, parts); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2259: WARNING - Missing return statement. Function expected to return Array|null. +polymer.html_script_10.js:2420: WARNING - Missing return statement. Function expected to return Array|null. static _parseBindings(text, templateInfo) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_10.js:2288: WARNING - Property args never defined on $jscomp$destructuring$var2 of type Object - let {args, methodName} = signature; - ^^^^ - -/polymer.html_script_10.js:2288: WARNING - Property methodName never defined on $jscomp$destructuring$var2 of type Object - let {args, methodName} = signature; - ^^^^^^^^^^ - -/polymer.html_script_10.js:2341: WARNING - Property source never defined on part of type Object - } else if (path != part.source) { - ^^^^^^^^^^^ - -/polymer.html_script_10.js:2342: WARNING - Property source never defined on part of type Object - value = Polymer.Path.get(inst, part.source); - ^^^^^^^^^^^ - -/polymer.html_script_10.js:2347: WARNING - Property __data never defined on inst of type HTMLElement - value = inst.__data[path]; - ^^^^^^^^^^^ - -/polymer.html_script_11.js:124: WARNING - Property properties never defined on klass of type HTMLElement - klass.properties : {}; - ^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:142: WARNING - Property observers never defined on klass of type HTMLElement - klass.observers : []; - ^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:182: WARNING - Property prototype never defined on klass of type HTMLElement{__classProperties:Object|null} +polymer.html_script_11.js:181: WARNING - Property prototype never defined on klass of type HTMLElement{__classProperties:Object|null} let superCtor = Object.getPrototypeOf(klass.prototype).constructor; ^^^^^^^^^^^^^^^ -/polymer.html_script_11.js:185: WARNING - Invalid type for parameter 1 of function propertiesForClass. -Expected : HTMLElement|null -Found : Function - - Object.create(propertiesForClass(superCtor)), - ^^^^^^^^^ - -/polymer.html_script_11.js:239: WARNING - Property prototype never defined on klass of type HTMLElement - let proto = klass.prototype; - ^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:258: WARNING - Property prototype never defined on klass of type HTMLElement{__finalized:boolean} - let proto = klass.prototype; - ^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:272: WARNING - Property template never defined on klass of type HTMLElement{__finalized:boolean, is:truthy=} - let template = klass.template; - ^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:316: WARNING - Property _createMethodObserver never defined on proto of type HTMLElement - proto._createMethodObserver(observers[i], dynamicFns); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:388: WARNING - Property _hasReadOnlyEffect never defined on proto of type HTMLElement - if (info.computed && !proto._hasReadOnlyEffect(name)) { - ^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:389: WARNING - Property _createComputedProperty never defined on proto of type HTMLElement - proto._createComputedProperty(name, info.computed, allProps); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:391: WARNING - Property _hasReadOnlyEffect never defined on proto of type HTMLElement - if (info.readOnly && !proto._hasReadOnlyEffect(name)) { - ^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:392: WARNING - Property _createReadOnlyProperty never defined on proto of type HTMLElement - proto._createReadOnlyProperty(name, !info.computed); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:394: WARNING - Property _hasReflectEffect never defined on proto of type HTMLElement - if (info.reflectToAttribute && !proto._hasReflectEffect(name)) { - ^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:395: WARNING - Property _createReflectedProperty never defined on proto of type HTMLElement - proto._createReflectedProperty(name); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:397: WARNING - Property _hasNotifyEffect never defined on proto of type HTMLElement - if (info.notify && !proto._hasNotifyEffect(name)) { - ^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:398: WARNING - Property _createNotifyingProperty never defined on proto of type HTMLElement - proto._createNotifyingProperty(name); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:402: WARNING - Property _createPropertyObserver never defined on proto of type HTMLElement - proto._createPropertyObserver(name, info.observer, allProps[info.observer]); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:431: WARNING - Invalid type for parameter 1 of function window.ShadyCSS.prepareTemplate. -Expected : HTMLTemplateElement -Found : HTMLTemplateElement|null -More details: -The found type is a union that includes an unexpected type: null - window.ShadyCSS.prepareTemplate(template, is, ext); - ^^^^^^^^ - -/polymer.html_script_11.js:433: WARNING - Property _bindTemplate never defined on proto of type HTMLElement - proto._bindTemplate(template); - ^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:454: WARNING - Invalid type for parameter 1 of function propertiesForClass. -Expected : HTMLElement|null -Found : PolymerElement - - let properties = propertiesForClass(this); - ^^^^ - -/polymer.html_script_11.js:520: WARNING - Property is never defined on this of type PolymerElement - this._template = Polymer.DomModule.import(this.is, 'template') || - ^^^^^^^ - -/polymer.html_script_11.js:524: WARNING - Property prototype never defined on this of type PolymerElement - Object.getPrototypeOf(this.prototype).constructor.template; - ^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:542: WARNING - Property is never defined on this of type PolymerElement - const module = Polymer.DomModule.import(this.is); - ^^^^^^^ - -/polymer.html_script_11.js:544: WARNING - Property prototype never defined on this of type PolymerElement - Object.getPrototypeOf(this.prototype).constructor.importPath; - ^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:570: WARNING - Invalid type for parameter 1 of function finalizeTemplate. -Expected : HTMLElement|null -Found : Object|null -More details: -The found type is a union that includes an unexpected type: Object - finalizeTemplate(this.__proto__, this._template, baseURI, - ^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:571: WARNING - Property localName never defined on this of type PolymerElement{_template:HTMLTemplateElement{__polymerFinalized:boolean}, constructor:Function} - this.localName); - ^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:578: WARNING - Invalid type for parameter 1 of function propertyDefaultsForClass. -Expected : HTMLElement|null -Found : Function - - let p$ = propertyDefaultsForClass(this.constructor); - ^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:614: WARNING - Invalid type for parameter 1 of function window.ShadyCSS.styleElement. -Expected : HTMLElement -Found : PolymerElement{_template:truthy} - - window.ShadyCSS.styleElement(this); - ^^^^ - -/polymer.html_script_11.js:639: WARNING - Property $ never defined on this.root of type DocumentFragment +polymer.html_script_11.js:636: WARNING - Property $ never defined on this.root of type DocumentFragment this.$ = this.root.$; ^^^^^^^^^^^ -/polymer.html_script_11.js:672: WARNING - Missing return statement. Function expected to return Node|null. - _attachDom(dom) { - ^^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:706: WARNING - Invalid type for parameter 1 of function propertiesForClass. -Expected : HTMLElement|null -Found : Function|null -More details: -The found type is a union that includes an unexpected type: Function - let type = propertiesForClass(this.constructor)[property].type; - ^^^^^^^^^^^^^^^^ - -/polymer.html_script_11.js:731: WARNING - Invalid type for parameter 1 of function window.ShadyCSS.styleSubtree. -Expected : HTMLElement -Found : PolymerElement - - window.ShadyCSS.styleSubtree(this, properties); - ^^^^ - -/polymer.html_script_11.js:763: WARNING - Property _parseTemplateContent never defined on polymerElementBase of type polymerElementBase<|function(new:polymerElementBase):?|> +polymer.html_script_11.js:766: WARNING - Property _parseTemplateContent never defined on polymerElementBase of type polymerElementBase<|function(new:polymerElementBase):?|> return super._parseTemplateContent(template, templateInfo, nodeInfo); ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_11.js:854: WARNING - Property is never defined on prototype of type HTMLElement - console.log('[' + prototype.is + ']: registered') - ^^^^^^^^^^^^ - -/polymer.html_script_22.js:853: WARNING - Function this.splice: called with 3 argument(s). Function requires at least 4 argument(s) and at most 4. +polymer.html_script_22.js:853: WARNING - Function this.splice: called with 3 argument(s). Function requires at least 4 argument(s) and at most 4. return this.splice(arrayOrPath, index, 1); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_23.js:141: WARNING - Property is never defined on this of type PolymerGenerated +polymer.html_script_23.js:141: WARNING - Property is never defined on this of type PolymerGenerated Polymer.DomModule.import(this.is, 'template') || ^^^^^^^ -/polymer.html_script_23.js:146: WARNING - Property prototype never defined on this of type PolymerGenerated +polymer.html_script_23.js:146: WARNING - Property prototype never defined on this of type PolymerGenerated this.prototype._template; ^^^^^^^^^^^^^^ -/polymer.html_script_23.js:177: WARNING - Property _addMethodEventListenerToNode never defined on this of type PolymerGenerated +polymer.html_script_23.js:177: WARNING - Property _addMethodEventListenerToNode never defined on this of type PolymerGenerated this._addMethodEventListenerToNode(this, l, info.listeners[l]); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_23.js:188: WARNING - Property _ensureAttribute never defined on this of type PolymerGenerated +polymer.html_script_23.js:188: WARNING - Property _ensureAttribute never defined on this of type PolymerGenerated this._ensureAttribute(a, info.hostAttributes[a]); ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_23.js:304: WARNING - Type annotation references non-existent type Polymer.LegacyElement. +polymer.html_script_23.js:304: WARNING - Type annotation references non-existent type Polymer.LegacyElement. * @return {Polymer.LegacyElement} Generated class ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_23.js:313: WARNING - Invalid type for parameter 2 of function mixinBehaviors. +polymer.html_script_23.js:313: WARNING - Invalid type for parameter 2 of function mixinBehaviors. Expected : HTMLElement|null Found : HTMLElement<|function(new:HTMLElement):?|> mixinBehaviors(info.behaviors, HTMLElement) : ^^^^^^^^^^^ -/polymer.html_script_23.js:316: WARNING - Property is never defined on info of type Object - klass.is = info.is; - ^^^^^^^ - -/polymer.html_script_24.js:19: WARNING - Type annotation references non-existent type Polymer.LegacyElement. +polymer.html_script_24.js:19: WARNING - Type annotation references non-existent type Polymer.LegacyElement. * @return {Polymer.LegacyElement} Generated class ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_24.js:21: WARNING - Found two declarations for property _polymerFn on window.Polymer. +polymer.html_script_24.js:21: WARNING - Found two declarations for property _polymerFn on window.Polymer. window.Polymer._polymerFn = function(info) { ^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_25.js:173: WARNING - Property mutableData never defined on this of type OptionalMutableData +polymer.html_script_25.js:173: WARNING - Property mutableData never defined on this of type OptionalMutableData return mutablePropertyChange(this, property, value, old, this.mutableData); ^^^^^^^^^^^^^^^^ -/polymer.html_script_26.js:118: WARNING - Property __dataHost never defined on this.__dataHost of type DataTemplate +polymer.html_script_26.js:118: WARNING - Property __dataHost never defined on this.__dataHost of type DataTemplate let templateHost = this.__dataHost.__dataHost; ^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_26.js:190: WARNING - Property __dataHost never defined on model.__dataHost of type DataTemplate +polymer.html_script_26.js:190: WARNING - Property __dataHost never defined on model.__dataHost of type DataTemplate model = model.__dataHost.__dataHost; ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_26.js:232: WARNING - Property _bindTemplate never defined on klass.prototype of type klass.prototype - klass.prototype._bindTemplate(template); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_26.js:250: WARNING - Property _addPropertyEffect never defined on klass.prototype of type $polymer_html_script_26$classdecl$var1.prototype - klass.prototype._addPropertyEffect('_host_' + prop, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_26.js:251: WARNING - Property PROPERTY_EFFECT_TYPES never defined on klass.prototype of type $polymer_html_script_26$classdecl$var1.prototype - klass.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_26.js:253: WARNING - Property _createNotifyingProperty never defined on klass.prototype of type $polymer_html_script_26$classdecl$var1.prototype - klass.prototype._createNotifyingProperty('_host_' + prop); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_26.js:435: WARNING - Returned type does not match declared return type. +polymer.html_script_26.js:435: WARNING - Returned type does not match declared return type. Expected : TemplateInstanceBase|null -Found : $polymer_html_script_26$classdecl$var2<|function(new:$polymer_html_script_26$classdecl$var2,...?):undefined|>{prototype:$polymer_html_script_26$classdecl$var2.prototype} +Found : polymer_html_script_26$classdecl$var2<|function(new:polymer_html_script_26$classdecl$var2,...?):undefined|>{prototype:polymer_html_script_26$classdecl$var2.prototype} return klass; ^^^^^^^^^^^^^ -/polymer.html_script_28.js:49: WARNING - Cannot add property mutableData to a struct instance after it is constructed. +polymer.html_script_28.js:49: WARNING - Cannot add property mutableData to a struct instance after it is constructed. this.mutableData = true; ^^^^^^^^^^^^^^^^ -/polymer.html_script_28.js:86: WARNING - Function $jscomp$this.render: called with 1 argument(s). Function requires at least 0 argument(s) and at most 0. +polymer.html_script_28.js:86: WARNING - Function $jscomp$this.render: called with 1 argument(s). Function requires at least 0 argument(s) and at most 0. this.render(template); ^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_28.js:94: WARNING - Property _stampTemplate never defined on this of type DomBind +polymer.html_script_28.js:94: WARNING - Property _stampTemplate never defined on this of type DomBind this.root = this._stampTemplate(template); ^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_28.js:100: WARNING - Property _flushProperties never defined on this of type DomBind{__children:Array, root:{$:?, firstChild:?} (loose)} - this._flushProperties(); - ^^^^^^^^^^^^^^^^^^^^^ +polymer.html_script_28.js:100: WARNING - Property _enableProperties never defined on this of type DomBind{__children:Array, root:{$:?, firstChild:?} (loose)} + this._enableProperties(); + ^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_30.js:279: WARNING - Cannot add property __isDetached to a struct instance after it is constructed. +polymer.html_script_30.js:279: WARNING - Cannot add property __isDetached to a struct instance after it is constructed. this.__isDetached = true; ^^^^^^^^^^^^^^^^^ -/polymer.html_script_30.js:302: WARNING - Cannot add property template to a struct instance after it is constructed. +polymer.html_script_30.js:302: WARNING - Cannot add property template to a struct instance after it is constructed. let template = this.template = this.querySelector('template'); ^^^^^^^^^^^^^ -/polymer.html_script_30.js:318: WARNING - Property as never defined on this of type DomRepeat +polymer.html_script_30.js:318: WARNING - Property as never defined on this of type DomRepeat instanceProps[this.as] = true; ^^^^^^^ -/polymer.html_script_30.js:319: WARNING - Property indexAs never defined on this of type DomRepeat +polymer.html_script_30.js:319: WARNING - Property indexAs never defined on this of type DomRepeat instanceProps[this.indexAs] = true; ^^^^^^^^^^^^ -/polymer.html_script_30.js:320: WARNING - Property itemsIndexAs never defined on this of type DomRepeat +polymer.html_script_30.js:320: WARNING - Property itemsIndexAs never defined on this of type DomRepeat instanceProps[this.itemsIndexAs] = true; ^^^^^^^^^^^^^^^^^ -/polymer.html_script_30.js:322: WARNING - Property mutableData never defined on this of type DomRepeat +polymer.html_script_30.js:322: WARNING - Property mutableData never defined on this of type DomRepeat mutableData: this.mutableData, ^^^^^^^^^^^^^^^^ -/polymer.html_script_30.js:363: 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: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: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: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:415: 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: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: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: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:449: 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:true, __observePaths:truthy} this.__debounceRender(this.__render, this.delay); ^^^^^^^^^^ -/polymer.html_script_30.js:463: 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: @@ -814,312 +394,190 @@ 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: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:495: 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:531: 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:532: 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:533: 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:569: 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:570: 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:571: 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:580: 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:581: 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:582: 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:616: 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:640: 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:654: 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:675: 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); ^^^^^^^^^^^^^ -/polymer.html_script_31.js:142: WARNING - Property _lastIf never defined on this of type DomIf{__instance:?, if:?=, restamp:?=} +polymer.html_script_31.js:142: WARNING - Property _lastIf never defined on this of type DomIf{__instance:?, if:?=, restamp:?=} if (this.if != this._lastIf) { ^^^^^^^^^^^^ -/polymer.html_script_31.js:147: WARNING - Cannot add property _lastIf to a struct instance after it is constructed. +polymer.html_script_31.js:147: WARNING - Cannot add property _lastIf to a struct instance after it is constructed. this._lastIf = this.if; ^^^^^^^^^^^^ -/polymer.html_script_31.js:170: WARNING - Cannot add property __ctor to a struct instance after it is constructed. +polymer.html_script_31.js:170: WARNING - Cannot add property __ctor to a struct instance after it is constructed. this.__ctor = Polymer.Templatize.templatize(template, this, { ^^^^^^^^^^^ -/polymer.html_script_31.js:219: 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:242: 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; ^^^^^^^ -/polymer.html_script_32.js:143: WARNING - Property items never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:143: WARNING - Property items never defined on this of type ArraySelectorMixin if (selected.has(this.items[idx])) { ^^^^^^^^^^ -/polymer.html_script_32.js:144: WARNING - Property items never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:144: WARNING - Property items never defined on this of type ArraySelectorMixin selected.set(this.items[idx], idx); ^^^^^^^^^^ -/polymer.html_script_32.js:155: WARNING - Property splice never defined on $jscomp$this of type ArraySelectorMixin{multi:truthy} +polymer.html_script_32.js:155: WARNING - Property splice never defined on $jscomp$this of type ArraySelectorMixin{multi:truthy} this.splice('selected', sidx, 1); ^^^^^^^^^^^ -/polymer.html_script_32.js:157: WARNING - Cannot add property selected to a struct instance after it is constructed. +polymer.html_script_32.js:157: WARNING - Cannot add property selected to a struct instance after it is constructed. this.selected = this.selectedItem = null; ^^^^^^^^^^^^^ -/polymer.html_script_32.js:157: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. +polymer.html_script_32.js:157: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. this.selected = this.selectedItem = null; ^^^^^^^^^^^^^^^^^ -/polymer.html_script_32.js:167: WARNING - Cannot add property __dataLinkedPaths to a struct instance after it is constructed. +polymer.html_script_32.js:167: WARNING - Cannot add property __dataLinkedPaths to a struct instance after it is constructed. this.__dataLinkedPaths = {}; ^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_32.js:172: WARNING - Property linkPaths never defined on $jscomp$this of type ArraySelectorMixin +polymer.html_script_32.js:172: WARNING - Property linkPaths never defined on $jscomp$this of type ArraySelectorMixin this.linkPaths('items.' + idx, 'selected.' + sidx++); ^^^^^^^^^^^^^^ -/polymer.html_script_32.js:177: WARNING - Property linkPaths never defined on $jscomp$this of type ArraySelectorMixin +polymer.html_script_32.js:177: WARNING - Property linkPaths never defined on $jscomp$this of type ArraySelectorMixin this.linkPaths('selected', 'items.' + idx); ^^^^^^^^^^^^^^ -/polymer.html_script_32.js:178: WARNING - Property linkPaths never defined on $jscomp$this of type ArraySelectorMixin +polymer.html_script_32.js:178: WARNING - Property linkPaths never defined on $jscomp$this of type ArraySelectorMixin this.linkPaths('selectedItem', 'items.' + idx); ^^^^^^^^^^^^^^ -/polymer.html_script_32.js:189: WARNING - Cannot add property __dataLinkedPaths to a struct instance after it is constructed. +polymer.html_script_32.js:189: WARNING - Cannot add property __dataLinkedPaths to a struct instance after it is constructed. this.__dataLinkedPaths = {}; ^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_32.js:196: WARNING - Cannot add property selected to a struct instance after it is constructed. +polymer.html_script_32.js:196: WARNING - Cannot add property selected to a struct instance after it is constructed. this.selected = this.multi ? [] : null ^^^^^^^^^^^^^ -/polymer.html_script_32.js:197: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. +polymer.html_script_32.js:197: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. this.selectedItem = null; ^^^^^^^^^^^^^^^^^ -/polymer.html_script_32.js:217: WARNING - Property items never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:217: WARNING - Property items never defined on this of type ArraySelectorMixin return this.isSelected(this.items[idx]); ^^^^^^^^^^ -/polymer.html_script_32.js:233: WARNING - Property __dataLinkedPaths never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:233: WARNING - Property __dataLinkedPaths never defined on this of type ArraySelectorMixin let selected = this.__dataLinkedPaths['items.' + idx]; ^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_32.js:254: WARNING - Property splice never defined on this +polymer.html_script_32.js:254: WARNING - Property splice never defined on this this.splice('selected', sidx, 1); ^^^^^^^^^^^ -/polymer.html_script_32.js:256: WARNING - Cannot add property selected to a struct instance after it is constructed. +polymer.html_script_32.js:256: WARNING - Cannot add property selected to a struct instance after it is constructed. this.selected = this.selectedItem = null; ^^^^^^^^^^^^^ -/polymer.html_script_32.js:256: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. +polymer.html_script_32.js:256: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. this.selected = this.selectedItem = null; ^^^^^^^^^^^^^^^^^ -/polymer.html_script_32.js:267: WARNING - Property items never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:267: WARNING - Property items never defined on this of type ArraySelectorMixin this.deselect(this.items[idx]); ^^^^^^^^^^ -/polymer.html_script_32.js:277: WARNING - Property items never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:277: WARNING - Property items never defined on this of type ArraySelectorMixin this.selectIndex(this.items.indexOf(item)); ^^^^^^^^^^ -/polymer.html_script_32.js:287: WARNING - Property items never defined on this of type ArraySelectorMixin +polymer.html_script_32.js:287: WARNING - Property items never defined on this of type ArraySelectorMixin let item = this.items[idx]; ^^^^^^^^^^ -/polymer.html_script_32.js:295: WARNING - Property push never defined on this of type ArraySelectorMixin{__selectedMap:{set:LOOSE_TOP_FUNCTION} (loose), multi:truthy} +polymer.html_script_32.js:295: WARNING - Property push never defined on this of type ArraySelectorMixin{__selectedMap:{set:LOOSE_TOP_FUNCTION} (loose), multi:truthy=} this.push('selected', item); ^^^^^^^^^ -/polymer.html_script_32.js:297: WARNING - Cannot add property selected to a struct instance after it is constructed. +polymer.html_script_32.js:297: WARNING - Cannot add property selected to a struct instance after it is constructed. this.selected = this.selectedItem = item; ^^^^^^^^^^^^^ -/polymer.html_script_32.js:297: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. +polymer.html_script_32.js:297: WARNING - Cannot add property selectedItem to a struct instance after it is constructed. this.selected = this.selectedItem = item; ^^^^^^^^^^^^^^^^^ -/polymer.html_script_33.js:47: WARNING - Returned type does not match declared return type. +polymer.html_script_33.js:47: WARNING - Returned type does not match declared return type. Expected : HTMLStyleElement|null Found : undefined return; ^^^^^^^ -/polymer.html_script_33.js:55: WARNING - Returned type does not match declared return type. +polymer.html_script_33.js:55: WARNING - Returned type does not match declared return type. Expected : HTMLStyleElement|null Found : Element return this._style; ^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_34.js:5: WARNING - Property _mutablePropertyChange never defined on Polymer.MutableData of type function(?):? +polymer.html_script_34.js:5: WARNING - Property _mutablePropertyChange never defined on Polymer.MutableData of type function(?):? let mutablePropertyChange = Polymer.MutableData._mutablePropertyChange; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/polymer.html_script_5.js:87: WARNING - Property importForElement never defined on HTMLImports of type HTMLImports - HTMLImports.importForElement(this) || document : this.ownerDocument; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_5.js:90: WARNING - Cannot add property __assetpath to a struct instance after it is constructed. - this.__assetpath = Polymer.ResolveUrl.pathFromUrl(url); - ^^^^^^^^^^^^^^^^ - -/polymer.html_script_6.js:179: WARNING - Invalid type for parameter 1 of function this.normalize. -Expected : string|undefined -Found : Array - - return this.normalize(path).split('.'); - ^^^^ - -/polymer.html_script_8.js:110: WARNING - Function this._attributeToProperty: called with 2 argument(s). Function requires at least 3 argument(s) and at most 3. - this._attributeToProperty(name, value); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_8.js:189: WARNING - Property hasAttribute never defined on this of type PropertyAccessors - if (!this.hasAttribute(attribute)) { - ^^^^^^^^^^^^^^^^^ - -/polymer.html_script_8.js:190: WARNING - Invalid type for parameter 1 of function this._valueToNodeAttribute. -Expected : Element|null -Found : PropertyAccessors - - this._valueToNodeAttribute(this, value, attribute); - ^^^^ - -/polymer.html_script_8.js:222: WARNING - Invalid type for parameter 1 of function this._valueToNodeAttribute. -Expected : Element|null -Found : PropertyAccessors{__serializing:boolean} - - this._valueToNodeAttribute(this, value, - ^^^^ - -/polymer.html_script_8.js:412: WARNING - Missing return statement. Function expected to return boolean. - _setPendingProperty(property, value) { - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_9.js:215: WARNING - Property hasAttribute never defined on node of type Node - if (node.localName == 'template' && !node.hasAttribute('preserve-content')) { - ^^^^^^^^^^^^^^^^^ - -/polymer.html_script_9.js:258: WARNING - Invalid type for parameter 1 of function root.removeChild. -Expected : Node|null -Found : {nextSibling:?, nodeType:number, textContent:number|string} (loose) - - root.removeChild(n); - ^ - -/polymer.html_script_9.js:315: WARNING - Invalid type for parameter 1 of function Array.from. -Expected : IArrayLike|Iterable|string -Found : NamedNodeMap|null -More details: -The found type is a union that includes an unexpected type: null - let attrs = Array.from(node.attributes); - ^^^^^^^^^^^^^^^ - -/polymer.html_script_9.js:337: WARNING - Missing return statement. Function expected to return boolean. - static _parseTemplateNodeAttribute(node, templateInfo, nodeInfo, name, value) { - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_9.js:340: WARNING - Property removeAttribute never defined on node of type Node - node.removeAttribute(name); - ^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_9.js:366: WARNING - Property __templateInfo never defined on template of type HTMLTemplateElement - let templateInfo = template.__templateInfo; - ^^^^^^^^^^^^^^^^^^^^^^^ - -/polymer.html_script_9.js:412: WARNING - Returned type does not match declared return type. -Expected : DocumentFragment|null -Found : Node{$:Object{}, __noInsertionPoint:boolean, nodeList:Array} - - return dom; - ^^^^^^^^^^^ - -externs/closure-types.js:375: WARNING - property connectedCallback not defined on any supertype of Polymer_ElementMixin -Polymer_ElementMixin.prototype.connectedCallback = function(){}; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:379: WARNING - property disconnectedCallback not defined on any supertype of Polymer_ElementMixin -Polymer_ElementMixin.prototype.disconnectedCallback = function(){}; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:399: WARNING - property attributeChangedCallback not defined on any supertype of Polymer_ElementMixin -Polymer_ElementMixin.prototype.attributeChangedCallback = function(name, old, value){}; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:733: WARNING - property mutableData on interface Polymer_OptionalMutableData is not implemented by type OptionalMutableData -Polymer_OptionalMutableData.prototype.mutableData; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:747: WARNING - property items on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin -Polymer_ArraySelectorMixin.prototype.items; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:750: WARNING - property multi on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin -Polymer_ArraySelectorMixin.prototype.multi; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:753: WARNING - property selected on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin -Polymer_ArraySelectorMixin.prototype.selected; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:756: WARNING - property selectedItem on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin -Polymer_ArraySelectorMixin.prototype.selectedItem; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -externs/closure-types.js:759: WARNING - property toggle on interface Polymer_ArraySelectorMixin is not implemented by type ArraySelectorMixin -Polymer_ArraySelectorMixin.prototype.toggle; -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -0 error(s), 240 warning(s), 74.8% typed +0 error(s), 126 warning(s), 75.3% typed diff --git a/externs/closure-types.js b/externs/closure-types.js index 1de65b6390..1f78651bc6 100644 --- a/externs/closure-types.js +++ b/externs/closure-types.js @@ -12,9 +12,9 @@ */ function Polymer_PropertyAccessors(){} /** -* @param {*} name -* @param {*} old -* @param {*} value +* @param {string} name +* @param {?string} old +* @param {?string} value */ Polymer_PropertyAccessors.prototype.attributeChangedCallback = function(name, old, value){}; /** @@ -35,8 +35,8 @@ Polymer_PropertyAccessors.prototype._initializeInstanceProperties = function(pro Polymer_PropertyAccessors.prototype._ensureAttribute = function(attribute, value){}; /** * @param {string} attribute -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type */ Polymer_PropertyAccessors.prototype._attributeToProperty = function(attribute, value, type){}; /** @@ -57,8 +57,8 @@ Polymer_PropertyAccessors.prototype._valueToNodeAttribute = function(node, value */ Polymer_PropertyAccessors.prototype._serializeValue = function(value){}; /** -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type * @return {*} */ Polymer_PropertyAccessors.prototype._deserializeValue = function(value, type){}; @@ -174,9 +174,9 @@ Polymer_PropertyEffects.prototype._addEventListenerToNode = function(node, event */ Polymer_PropertyEffects.prototype._removeEventListenerFromNode = function(node, eventName, handler){}; /** -* @param {*} name -* @param {*} old -* @param {*} value +* @param {string} name +* @param {?string} old +* @param {?string} value */ Polymer_PropertyEffects.prototype.attributeChangedCallback = function(name, old, value){}; /** @@ -184,12 +184,12 @@ Polymer_PropertyEffects.prototype.attributeChangedCallback = function(name, old, Polymer_PropertyEffects.prototype._initializeProperties = function(){}; /** * @override -* @param {*} props +* @param {Object} props */ Polymer_PropertyEffects.prototype._initializeProtoProperties = function(props){}; /** * @override -* @param {*} props +* @param {Object} props */ Polymer_PropertyEffects.prototype._initializeInstanceProperties = function(props){}; /** @@ -199,8 +199,8 @@ Polymer_PropertyEffects.prototype._initializeInstanceProperties = function(props Polymer_PropertyEffects.prototype._ensureAttribute = function(attribute, value){}; /** * @param {string} attribute -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type */ Polymer_PropertyEffects.prototype._attributeToProperty = function(attribute, value, type){}; /** @@ -221,8 +221,8 @@ Polymer_PropertyEffects.prototype._valueToNodeAttribute = function(node, value, */ Polymer_PropertyEffects.prototype._serializeValue = function(value){}; /** -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type * @return {*} */ Polymer_PropertyEffects.prototype._deserializeValue = function(value, type){}; @@ -490,8 +490,8 @@ Polymer_ElementMixin.prototype._removeEventListenerFromNode = function(node, eve /** * @override * @param {string} name -* @param {string} old -* @param {string} value +* @param {?string} old +* @param {?string} value */ Polymer_ElementMixin.prototype.attributeChangedCallback = function(name, old, value){}; /** @@ -500,12 +500,12 @@ Polymer_ElementMixin.prototype.attributeChangedCallback = function(name, old, va Polymer_ElementMixin.prototype._initializeProperties = function(){}; /** * @override -* @param {*} props +* @param {Object} props */ Polymer_ElementMixin.prototype._initializeProtoProperties = function(props){}; /** * @override -* @param {*} props +* @param {Object} props */ Polymer_ElementMixin.prototype._initializeInstanceProperties = function(props){}; /** @@ -515,8 +515,8 @@ Polymer_ElementMixin.prototype._initializeInstanceProperties = function(props){} Polymer_ElementMixin.prototype._ensureAttribute = function(attribute, value){}; /** * @param {string} attribute -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type */ Polymer_ElementMixin.prototype._attributeToProperty = function(attribute, value, type){}; /** @@ -537,8 +537,8 @@ Polymer_ElementMixin.prototype._valueToNodeAttribute = function(node, value, att */ Polymer_ElementMixin.prototype._serializeValue = function(value){}; /** -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type * @return {*} */ Polymer_ElementMixin.prototype._deserializeValue = function(value, type){}; @@ -847,8 +847,8 @@ Polymer_LegacyElementMixin.prototype._removeEventListenerFromNode = function(nod /** * @override * @param {string} name -* @param {string} old -* @param {string} value +* @param {?string} old +* @param {?string} value */ Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, old, value){}; /** @@ -857,12 +857,12 @@ Polymer_LegacyElementMixin.prototype.attributeChangedCallback = function(name, o Polymer_LegacyElementMixin.prototype._initializeProperties = function(){}; /** * @override -* @param {*} props +* @param {Object} props */ Polymer_LegacyElementMixin.prototype._initializeProtoProperties = function(props){}; /** * @override -* @param {*} props +* @param {Object} props */ Polymer_LegacyElementMixin.prototype._initializeInstanceProperties = function(props){}; /** @@ -872,8 +872,8 @@ Polymer_LegacyElementMixin.prototype._initializeInstanceProperties = function(pr Polymer_LegacyElementMixin.prototype._ensureAttribute = function(attribute, value){}; /** * @param {string} attribute -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type */ Polymer_LegacyElementMixin.prototype._attributeToProperty = function(attribute, value, type){}; /** @@ -894,8 +894,8 @@ Polymer_LegacyElementMixin.prototype._valueToNodeAttribute = function(node, valu */ Polymer_LegacyElementMixin.prototype._serializeValue = function(value){}; /** -* @param {string} value -* @param {*} type +* @param {?string} value +* @param {*=} type * @return {*} */ Polymer_LegacyElementMixin.prototype._deserializeValue = function(value, type){}; @@ -1165,8 +1165,8 @@ Polymer_LegacyElementMixin.prototype.attached = function(){}; Polymer_LegacyElementMixin.prototype.detached = function(){}; /** * @param {string} name -* @param {string} old -* @param {string} value +* @param {?string} old +* @param {?string} value */ Polymer_LegacyElementMixin.prototype.attributeChanged = function(name, old, value){}; /** diff --git a/gulpfile.js b/gulpfile.js index 0d1e9b4875..0e5c5fa66e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -146,6 +146,8 @@ gulp.task('closure', ['clean'], () => { rewrite_polyfills: false, new_type_inf: true, checks_only: CLOSURE_LINT_ONLY, + jscomp_warning: 'newCheckTypes', + jscomp_off: 'newCheckTypesExtraChecks', externs: [ 'bower_components/shadycss/externs/shadycss-externs.js', 'externs/webcomponents-externs.js', diff --git a/lib/legacy/legacy-element-mixin.html b/lib/legacy/legacy-element-mixin.html index ffb86dd6a6..2d3193065d 100644 --- a/lib/legacy/legacy-element-mixin.html +++ b/lib/legacy/legacy-element-mixin.html @@ -116,8 +116,8 @@ * Provides an override implementation of `attributeChangedCallback` * which adds the Polymer legacy API's `attributeChanged` method. * @param {string} name Name of attribute. - * @param {string} old Old value of attribute. - * @param {string} value Current value of attribute. + * @param {?string} old Old value of attribute. + * @param {?string} value Current value of attribute. * @override */ attributeChangedCallback(name, old, value) { @@ -131,8 +131,8 @@ * Legacy callback called during `attributeChangedChallback`, for overriding * by the user. * @param {string} name Name of attribute. - * @param {string} old Old value of attribute. - * @param {string} value Current value of attribute. + * @param {?string} old Old value of attribute. + * @param {?string} value Current value of attribute. */ attributeChanged(name, old, value) {} // eslint-disable-line no-unused-vars diff --git a/lib/mixins/element-mixin.html b/lib/mixins/element-mixin.html index 58880fa3aa..688c5ca14e 100644 --- a/lib/mixins/element-mixin.html +++ b/lib/mixins/element-mixin.html @@ -427,7 +427,7 @@ * * @param {PolymerElement} proto Element class prototype to add accessors * and effects to - * @param {HTMLTemplateElement} template Template to process and bind + * @param {!HTMLTemplateElement} template Template to process and bind * @param {string} baseURI URL against which to resolve urls in * style element cssText * @param {string} is Tag name (or type extension name) for this element @@ -573,6 +573,7 @@ * `properties` metadata. * * @override + * @suppress {invalidCasts} */ _initializeProperties() { Polymer.telemetry.instanceCount++; @@ -584,8 +585,8 @@ this._template.__polymerFinalized = true; const baseURI = importPath ? Polymer.ResolveUrl.resolveUrl(importPath) : ''; - finalizeTemplate(this.__proto__, this._template, baseURI, - this.localName); + finalizeTemplate(/** @type {!PolymerElement} */(this.__proto__), this._template, baseURI, + /**@type {!HTMLElement}*/(this).localName); } super._initializeProperties(); // set path defaults @@ -625,10 +626,11 @@ * when using the ShadyCSS scoping/custom properties polyfill. * * @override + * @suppress {invalidCasts} */ connectedCallback() { if (window.ShadyCSS && this._template) { - window.ShadyCSS.styleElement(this); + window.ShadyCSS.styleElement(/** @type {!HTMLElement} */(this)); } this._enableProperties(); } @@ -695,6 +697,7 @@ this.shadowRoot.appendChild(dom); return this.shadowRoot; } + return null; } else { throw new Error('ShadowDOM not available. ' + // TODO(sorvell): move to compile-time conditional when supported @@ -713,8 +716,8 @@ * properties. * * @param {string} name Name of attribute. - * @param {string} old Old value of attribute. - * @param {string} value Current value of attribute. + * @param {?string} old Old value of attribute. + * @param {?string} value Current value of attribute. * @override */ attributeChangedCallback(name, old, value) { @@ -742,10 +745,11 @@ * * @param {Object=} properties Bag of custom property key/values to * apply to this element. + * @suppress {invalidCasts} */ updateStyles(properties) { if (window.ShadyCSS) { - window.ShadyCSS.styleSubtree(this, properties); + window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */(this), properties); } } @@ -807,6 +811,7 @@ /** * @param {HTMLElement} prototype Element prototype to log * @private + * @suppress {missingProperties} */ _regLog: function(prototype) { console.log('[' + prototype.is + ']: registered') diff --git a/lib/mixins/property-effects.html b/lib/mixins/property-effects.html index c4aed80295..5a14042b7d 100644 --- a/lib/mixins/property-effects.html +++ b/lib/mixins/property-effects.html @@ -366,8 +366,8 @@ * run. * * @param {Element} inst The instance the effect will be run on - * @param {Object} changedProps Bag of changed properties - * @param {Object} oldProps Bag of previous values for changed properties + * @param {!Object} changedProps Bag of changed properties + * @param {!Object} oldProps Bag of previous values for changed properties * @param {boolean} hasPaths True with `props` contains one or more paths * @private */ @@ -1099,6 +1099,7 @@ * the prototype on the instance. * * @override + * @param {Object} props Properties to initialize on the prototype */ _initializeProtoProperties(props) { this.__data = Object.create(props); @@ -1111,6 +1112,7 @@ * `_setProperty`'s `shouldNotify: true`. * * @override + * @param {Object} props Properties to initialize on the instance */ _initializeInstanceProperties(props) { let readOnly = this.__readOnly; @@ -1379,6 +1381,7 @@ } return true; } + return false; } /** @@ -2565,6 +2568,10 @@ stack: [], + /** + * @param {*} inst Instance to add to hostStack + * @this {hostStack} + */ registerHost(inst) { if (this.stack.length) { let host = this.stack[this.stack.length-1]; @@ -2572,10 +2579,18 @@ } }, + /** + * @param {*} inst Instance to begin hosting + * @this {hostStack} + */ beginHosting(inst) { this.stack.push(inst); }, + /** + * @param {*} inst Instance to end hosting + * @this {hostStack} + */ endHosting(inst) { let stackLen = this.stack.length; if (stackLen && this.stack[stackLen-1] == inst) { diff --git a/lib/utils/mixin.html b/lib/utils/mixin.html index b0f8fb1c62..0678a9fcc6 100644 --- a/lib/utils/mixin.html +++ b/lib/utils/mixin.html @@ -39,6 +39,7 @@ * @param {T} mixin ES6 class expression mixin to wrap * @return {T} Wrapped mixin that deduplicates and memoizes * mixin applications to base + * @suppress {invalidCasts} */ Polymer.dedupingMixin = function(mixin) { let mixinApplications = /** @type {!MixinFunction} */(mixin).__mixinApplications; diff --git a/lib/utils/path.html b/lib/utils/path.html index a686ba54af..67c045665a 100644 --- a/lib/utils/path.html +++ b/lib/utils/path.html @@ -185,6 +185,7 @@ * @param {string | !Array} path Input path * @return {!Array} Array of path parts * @this {Path} + * @suppress {checkTypes} */ split: function(path) { if (Array.isArray(path)) { diff --git a/package.json b/package.json index 5aa45c27db..862fdad6fe 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "gulp-vulcanize": "^6.0.1", "lazypipe": "^1.0.1", "merge-stream": "^1.0.1", - "polymer-build": "1.1.x", + "polymer-build": "^1.5.0", "run-sequence": "^1.1.0", "through2": "^2.0.0", "web-component-tester": "^6.0.0-prerelease.4"