solid icon indicating copy to clipboard operation
solid copied to clipboard

<dialog/> ref prop has type of HTMLElement instead of HTMLDialogElement

Open toondkn opened this issue 2 years ago • 1 comments

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

toondkn avatar Jul 28 '22 22:07 toondkn

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.

ryansolid avatar Aug 01 '22 07:08 ryansolid