Skip to content

Add back element tag name map #329

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

Merged
merged 2 commits into from
Nov 22, 2017
Merged

Add back element tag name map #329

merged 2 commits into from
Nov 22, 2017

Conversation

mhegazy
Copy link
Contributor

@mhegazy mhegazy commented Nov 21, 2017

#326 removed ElementTagNameMap. turns our types in Definitelytyped depended on it. Putting it back.

@@ -831,6 +831,10 @@ module Emit =
Pt.Printl "}"
Pt.Printl ""

let EmitElementTagNameMap () =
Pt.Printl "interface ElementTagNameMap extends HTMLElementTagNameMap, SVGElementTagNameMap { }"
Copy link
Contributor

@falsandtru falsandtru Nov 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should extend only HTMLElementTagNameMap. If not, we can't define other SVG elements such as SVGAElement by extending the interface. So ElementTagNameMap should be just an alias of HTMLElementTagNameMap. This is a reasonable compromise as you said.

extends HTMLElementTagNameMap { }

Copy link
Contributor

@falsandtru falsandtru Nov 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And ElementTagNameMap should be marked as deprecated.

@falsandtru
Copy link
Contributor

Why you don't update DefinitelyTyped?

@mhegazy
Copy link
Contributor Author

mhegazy commented Nov 22, 2017

Why you don't update DefinitelyTyped?

The only way i could think of is adding some forward references to the new types.. but this seems ugly.. This also indicates that there are other users for the type out there.. having the type in the library is better than breaking users.

@mhegazy mhegazy merged commit 30a0d04 into master Nov 22, 2017
@mhegazy mhegazy deleted the addBackElementTagNameMap branch November 22, 2017 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants