From f15b137d149f2fed778b57f07bd8800204121412 Mon Sep 17 00:00:00 2001 From: Peter Burns Date: Tue, 15 Jan 2019 12:02:44 -0800 Subject: [PATCH 1/2] Remove `@override` from static methods on mixins. Closure compiler is improving its handling of class inheritance, and it does not understand our mixins well enough to notice that these methods override their superclasses. These annotations cause compiler errors in an upcoming version of the compiler. --- lib/mixins/dir-mixin.js | 1 - lib/mixins/disable-upgrade-mixin.js | 1 - lib/mixins/element-mixin.js | 3 --- lib/mixins/property-effects.js | 3 --- 4 files changed, 8 deletions(-) diff --git a/lib/mixins/dir-mixin.js b/lib/mixins/dir-mixin.js index 6b458e11a8..09394e8391 100644 --- a/lib/mixins/dir-mixin.js +++ b/lib/mixins/dir-mixin.js @@ -109,7 +109,6 @@ export const DirMixin = dedupingMixin((base) => { class Dir extends elementBase { /** - * @override * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do */ static _processStyleText(cssText, baseURI) { diff --git a/lib/mixins/disable-upgrade-mixin.js b/lib/mixins/disable-upgrade-mixin.js index 5c16a30718..cfcd148430 100644 --- a/lib/mixins/disable-upgrade-mixin.js +++ b/lib/mixins/disable-upgrade-mixin.js @@ -56,7 +56,6 @@ export const DisableUpgradeMixin = dedupingMixin((base) => { class DisableUpgradeClass extends superClass { /** - * @override * @suppress {missingProperties} go/missingfnprops */ static get observedAttributes() { diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 5a9703986f..18e4fafe87 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -325,7 +325,6 @@ export const ElementMixin = dedupingMixin(base => { * find the template. * @return {void} * @protected - * @override * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do */ static _finalizeClass() { @@ -357,7 +356,6 @@ export const ElementMixin = dedupingMixin(base => { * and property effects for all of the properties. * @return {void} * @protected - * @override */ static createProperties(props) { for (let p in props) { @@ -724,7 +722,6 @@ export const ElementMixin = dedupingMixin(base => { * code. This map determines which method templates should have accessors * created for them. * - * @override * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do */ static _parseTemplateContent(template, templateInfo, nodeInfo) { diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index f44a3de365..4961eec486 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2484,7 +2484,6 @@ export const PropertyEffects = dedupingMixin(superClass => { * with one or more metadata objects capturing the source(s) of the * binding. * - * @override * @param {Node} node Node to parse * @param {TemplateInfo} templateInfo Template metadata for current template * @param {NodeInfo} nodeInfo Node metadata for current template node @@ -2517,7 +2516,6 @@ export const PropertyEffects = dedupingMixin(superClass => { * with one or more metadata objects capturing the source(s) of the * binding. * - * @override * @param {Element} node Node to parse * @param {TemplateInfo} templateInfo Template metadata for current template * @param {NodeInfo} nodeInfo Node metadata for current template node @@ -2581,7 +2579,6 @@ export const PropertyEffects = dedupingMixin(superClass => { * binding the properties that a nested template depends on to the template * as `_host_`. * - * @override * @param {Node} node Node to parse * @param {TemplateInfo} templateInfo Template metadata for current template * @param {NodeInfo} nodeInfo Node metadata for current template node From bdcd37c513f5447c2a3850ef49a072d590a19d90 Mon Sep 17 00:00:00 2001 From: Peter Burns Date: Tue, 15 Jan 2019 12:54:09 -0800 Subject: [PATCH 2/2] Lint clean --- lib/mixins/dir-mixin.js | 3 +++ lib/mixins/element-mixin.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/lib/mixins/dir-mixin.js b/lib/mixins/dir-mixin.js index 09394e8391..2bf8bb155b 100644 --- a/lib/mixins/dir-mixin.js +++ b/lib/mixins/dir-mixin.js @@ -109,6 +109,9 @@ export const DirMixin = dedupingMixin((base) => { class Dir extends elementBase { /** + * @param {string} cssText . + * @param {string} baseURI . + * @return {string} . * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do */ static _processStyleText(cssText, baseURI) { diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 18e4fafe87..84c590686a 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -354,6 +354,7 @@ export const ElementMixin = dedupingMixin(base => { /** * Override of PropertiesChanged createProperties to create accessors * and property effects for all of the properties. + * @param {!Object} props . * @return {void} * @protected */ @@ -722,6 +723,10 @@ export const ElementMixin = dedupingMixin(base => { * code. This map determines which method templates should have accessors * created for them. * + * @param {!HTMLTemplateElement} template Template + * @param {!TemplateInfo} templateInfo Template metadata for current template + * @param {!NodeInfo} nodeInfo Node metadata for current template. + * @return {boolean} . * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do */ static _parseTemplateContent(template, templateInfo, nodeInfo) {