add html attribute validation & completions #849
Conversation
3c223c2 to
83fbaff
Compare
|
unable to test completions at the moment... |
5f9a02c to
b736e0b
Compare
|
Current test failure looks like a path hash mismatch. @patricklx can you update that snapshot? I wonder also if you happen to know how to do custom stapshot serializers, and have an idea for these sorts of paths? Thank you! |
There was a problem hiding this comment.
Thanks for adding the 'generated by' text up top
There was a problem hiding this comment.
Why are these needed on the global type?
On rather, why do we need to add a property to the existing elements?
There was a problem hiding this comment.
because I need to find the correct html attributes for an HtmlElement type.
The current flow for it is:
- Element Type -> find html name -> find attribute names in elements.d.ts
but some elements share the same type for example HtmlHeadingElement, HtmlTableTRElement etc which then make error show unrelated element info.
e.g. key does not exist on AttributesForElement<Tr> instead of AttributesForElement<h1>
But looking at this now. I think I can merge both so that elemts.d.ts has a mapping of
HtmlElementType -> Html Attributes
instead of using element name
There was a problem hiding this comment.
That doesn't work...
I cannot make a map of type to another type...
| "sums-up": "^2.1.0", | ||
| "aria-attributes": "^2.0.1", | ||
| "html-element-attributes": "^3.3.0", | ||
| "html-event-attributes": "^2.2.0", |
There was a problem hiding this comment.
Is there a package for mathml?
There was a problem hiding this comment.
yes, https://github.com/wooorm/mathml-tag-names
it only has tag names, no attributes exists for them
There was a problem hiding this comment.
| }`); | ||
| } | ||
|
|
||
| const prefix = `//generated by scrips/build-augmentations.mjs\n`; |
There was a problem hiding this comment.
Can you add to the comment block about why this is needed, how it's used, etc?
Thanks!
There was a problem hiding this comment.
Tbh, i'm surprised no existing package has this information for us already.
How strange
|
Very excited for this! |
3af6cca to
dd91e0a
Compare
dd91e0a to
21b7791
Compare
21b7791 to
e488b9c
Compare
Uh oh!
There was an error while loading. Please reload this page.