Skip to content

ElementTagNameMap should extend HTMLElementTagNameMap #14784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
justinfagnani opened this issue Mar 22, 2017 · 2 comments
Closed

ElementTagNameMap should extend HTMLElementTagNameMap #14784

justinfagnani opened this issue Mar 22, 2017 · 2 comments
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@justinfagnani
Copy link

TypeScript Version: 2.2.1

Code

Along with #14782, this would let custom element definitions be able to augment only one tag name map:

export class FooElement extends HTMLElement {}
customElements.define('foo', FooElement);

declare global {
  interface HTMLElementTagNameMap {
    "foo": FooElement,
  }
}

And with #14783 ElementTagNameMap could extend both HTMLElementTagNameMap and the proposed SVGElementTagNameMap.

@mhegazy mhegazy added Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Suggestion An idea for TypeScript labels Mar 22, 2017
@mhegazy mhegazy added this to the Community milestone Mar 22, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Mar 22, 2017

PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.

@justinfagnani
Copy link
Author

Looks like this was fixed in microsoft/TypeScript-DOM-lib-generator@072c548

@mhegazy mhegazy removed this from the Community milestone Apr 26, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants