From 7f2d736a96953838d4ee62635071db0010dd3a3e Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Thu, 10 Jan 2019 12:23:55 -0800 Subject: [PATCH] Add @suppress annotations for missing property checks. Upstream of cl/228620162 --- lib/legacy/legacy-element-mixin.js | 3 ++- lib/mixins/disable-upgrade-mixin.js | 5 ++++- lib/mixins/element-mixin.js | 2 +- lib/mixins/property-effects.js | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/legacy/legacy-element-mixin.js b/lib/legacy/legacy-element-mixin.js index 2258d2e81c..b06f65fc55 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -367,7 +367,8 @@ export const LegacyElementMixin = dedupingMixin((base) => { * @param {HTMLTemplateElement} template HTML template element to instance. * @return {!DocumentFragment} Document fragment containing the imported * template content. - */ + * @suppress {missingProperties} go/missingfnprops + */ instanceTemplate(template) { let content = this.constructor._contentForTemplate(template); let dom = /** @type {!DocumentFragment} */ diff --git a/lib/mixins/disable-upgrade-mixin.js b/lib/mixins/disable-upgrade-mixin.js index 7d4d73404f..5c16a30718 100644 --- a/lib/mixins/disable-upgrade-mixin.js +++ b/lib/mixins/disable-upgrade-mixin.js @@ -55,7 +55,10 @@ export const DisableUpgradeMixin = dedupingMixin((base) => { */ class DisableUpgradeClass extends superClass { - /** @override */ + /** + * @override + * @suppress {missingProperties} go/missingfnprops + */ static get observedAttributes() { return super.observedAttributes.concat(DISABLED_ATTR); } diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 5c8d4e0311..5a9703986f 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -516,7 +516,7 @@ export const ElementMixin = dedupingMixin(base => { * * @return {void} * @override - * @suppress {invalidCasts} + * @suppress {invalidCasts,missingProperties} go/missingfnprops */ _initializeProperties() { this.constructor.finalize(); diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index c3ae4ed385..f44a3de365 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2088,6 +2088,7 @@ export const PropertyEffects = dedupingMixin(superClass => { * @param {string} property Property name * @return {void} * @protected + * @suppress {missingProperties} go/missingfnprops */ _createReflectedProperty(property) { let attr = this.constructor.attributeNameForProperty(property); @@ -2348,6 +2349,7 @@ export const PropertyEffects = dedupingMixin(superClass => { * @return {!TemplateInfo} Template metadata object; for `runtimeBinding`, * this is an instance of the prototypical template info * @protected + * @suppress {missingProperties} go/missingfnprops */ _bindTemplate(template, instanceBinding) { let templateInfo = this.constructor._parseTemplate(template);