ElementListTagNameMap should be a mapped type derived from ElementTagNameMap #14782
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
TypeScript Version: 2.2.1
Code
Right now there's some extra boilerplate when defining custom elements and augmenting dom.d.ts's tag name maps that could go away if mapped types were used more:
It would be nice to only have to augment one interface, like so:
We could get closer if
ElementListTagNameMap
was defined like this:The text was updated successfully, but these errors were encountered: