Closed rschristian closed 3 months ago
One case is Lume and its inline
plugin:
@ngdangtu-vn If you have a couple minutes, I'd love to know your thoughts on https://deploy-preview-1151--preactjs.netlify.app/guide/v10/typescript#extending-built-in-jsx-types
Is there anything missing that you'd like to see? Would this have been useful to you? Is it clear enough how to use?
Thanks, it looks very clear. It would be even more detail if we can add example on specific HTML element though. Like attributes for specific elements, such as input, link, meta etc.
I don't think that's something Preact's types support at the moment -- we don't differentiate attributes by element type, there's HTMLAttributes
(which applies to all elements) and only that.
There's a couple issues relating to this (like https://github.com/preactjs/preact/issues/4202) but there hasn't yet been any contributions providing this.
I see, that's pity but I think this is already very good for type hint atm. I believe many people will appreciate this doc.
People often need to create global attrs or types for custom elements and, at the moment, that usually means slogging through issues to find the right config. We should document this better.