Skip to content

Commit e717f0f

Browse files
committed
Remove gen-typescript-declarations; manually add LegacyElementMixin's setAttribute type.
1 parent 8b2ea7b commit e717f0f

5 files changed

+305
-556
lines changed

gen-tsd.json

-46
This file was deleted.

lib/legacy/legacy-element-mixin.d.ts

+7
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ interface LegacyElementMixin extends ElementMixin, PropertyEffects, TemplateStam
115115
*/
116116
created(): void;
117117

118+
/**
119+
* Sets the value of an attribute.
120+
* @param name The name of the attribute to change.
121+
* @param value The new attribute value.
122+
*/
123+
setAttribute(name: string, value: string): void;
124+
118125
/**
119126
* Removes an attribute.
120127
*

lib/legacy/legacy-element-mixin.js

-6
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,6 @@ export const LegacyElementMixin = dedupingMixin((base) => {
145145

146146
/**
147147
* Sets the value of an attribute.
148-
*
149-
* NOTE: This function is explicitly excluded when running
150-
* gen-typescript-declarations because the function it overrides has
151-
* different signatures in Closure and TypeScript's built-in types. This
152-
* function's signature should match the signature from Closure:
153-
* https://github.com/google/closure-compiler/blob/8972fd4e9b0689e7ebdeea53580521c819f6aecc/externs/browser/w3c_dom1.js#L686-L694
154148
* @override
155149
* @param {string} name The name of the attribute to change.
156150
* @param {string|number|boolean|!TrustedHTML|!TrustedScriptURL|!TrustedURL} value The new attribute value.

0 commit comments

Comments
 (0)