solid
solid copied to clipboard
<dialog/> ref prop has type of HTMLElement instead of HTMLDialogElement
Describe the bug
A TypeScript typing error.
The title described the issue in full.
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-qztpd4?file=src/App.tsx
Steps to Reproduce the Bug or Issue
Try consuming the element ref prop as a HTMLDialogElement. TypeScript will complain, it thinks it's an HTMLElement.
Expected behavior
ref prop is typed as HTMLDialogElement.Screenshots or Videos
No response
Platform
TypeScript 4.7.4.
Additional context
No response
We can update it but more info here: https://github.com/microsoft/TypeScript/issues/48267 I think I removed it thinking it was deprecated at some point because that is what TypeScript says. Looks like that is an upstream issue and we should just change to it.