Skip to content

Commit

Permalink
Fix TypeScript breakages by specifying types for overridden `setAttri…
Browse files Browse the repository at this point in the history
…bute` and `getAttribute`.
  • Loading branch information
bicknellr committed Apr 28, 2020
1 parent 282bd34 commit c8715b5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit c8715b5

Please sign in to comment.