From c8715b50b9069deca0fd1f8597882a76342b44ac Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Mon, 27 Apr 2020 18:35:14 -0700 Subject: [PATCH] Fix TypeScript breakages by specifying types for overridden `setAttribute` and `getAttribute`. --- lib/legacy/legacy-element-mixin.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/legacy/legacy-element-mixin.js b/lib/legacy/legacy-element-mixin.js index 8e38e62940..e2e136cba3 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -143,7 +143,11 @@ export const LegacyElementMixin = dedupingMixin((base) => { } } - /** @override */ + /** + * @override + * @param {string} name + * @param {string} value + */ setAttribute(name, value) { if (legacyNoObservedAttributes && !this._legacyForceObservedAttributes) { const oldValue = this.getAttribute(name); @@ -155,7 +159,10 @@ export const LegacyElementMixin = dedupingMixin((base) => { } } - /** @override */ + /** + * @override + * @param {string} name + */ removeAttribute(name) { if (legacyNoObservedAttributes && !this._legacyForceObservedAttributes) { const oldValue = this.getAttribute(name);