Skip to content

Commit

Permalink
Remove gen-typescript-declarations; manually add LegacyElementMixin's…
Browse files Browse the repository at this point in the history
… setAttribute type.
  • Loading branch information
bicknellr committed Apr 29, 2020
1 parent 8b2ea7b commit e717f0f
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 556 deletions.
46 changes: 0 additions & 46 deletions gen-tsd.json

This file was deleted.

7 changes: 7 additions & 0 deletions lib/legacy/legacy-element-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ interface LegacyElementMixin extends ElementMixin, PropertyEffects, TemplateStam
*/
created(): void;

/**
* Sets the value of an attribute.
* @param name The name of the attribute to change.
* @param value The new attribute value.
*/
setAttribute(name: string, value: string): void;

/**
* Removes an attribute.
*
Expand Down
6 changes: 0 additions & 6 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ export const LegacyElementMixin = dedupingMixin((base) => {

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

0 comments on commit e717f0f

Please sign in to comment.