mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5650 from Polymer/attribute-override-types
Fix TypeScript breakages by specifying types for overridden `setAttribute` and `getAttribute`.
This commit is contained in:
@@ -143,7 +143,12 @@ export const LegacyElementMixin = dedupingMixin((base) => {
|
||||
}
|
||||
}
|
||||
|
||||
/** @override */
|
||||
/**
|
||||
* Sets the value of an attribute.
|
||||
* @override
|
||||
* @param {string} name The name of the attribute to change.
|
||||
* @param {string} value The new attribute value.
|
||||
*/
|
||||
setAttribute(name, value) {
|
||||
if (legacyNoObservedAttributes && !this._legacyForceObservedAttributes) {
|
||||
const oldValue = this.getAttribute(name);
|
||||
@@ -155,7 +160,11 @@ export const LegacyElementMixin = dedupingMixin((base) => {
|
||||
}
|
||||
}
|
||||
|
||||
/** @override */
|
||||
/**
|
||||
* Removes an attribute.
|
||||
* @override
|
||||
* @param {string} name The name of the attribute to remove.
|
||||
*/
|
||||
removeAttribute(name) {
|
||||
if (legacyNoObservedAttributes && !this._legacyForceObservedAttributes) {
|
||||
const oldValue = this.getAttribute(name);
|
||||
|
||||
Reference in New Issue
Block a user