-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module "preact/compat"
has no exported member ElementRef
#4481
Comments
I'm mainly integrating shadcn and finding ts issues in the shadcn provided components. i'll try to keep adding all the issues i find in this comment
|
Edit: Strange, React provides their own, but it seemingly matches the standard event? I guess we can just re-export it. |
Isn't it like we'll re-export most of the unavailable types from react? |
We don't re-export anything from React, no. We do not rely on React's types for our own. It just makes little sense to me at this moment why React provides a |
maybe i'm too noob in TS world. but when u say re-export, do u mean to re-export from TS directly? |
Yup, assuming I'm not missing something, I believe that's all we'd do. I'm admittedly not a big TS user myself though. |
u said react provides their own |
No clue, feel free to look through the blame: source
You absolutely can (and should) in user code, if it fits your needs. Won't work for libs though if they expect to pull that type from React. |
This comment has been minimized.
This comment has been minimized.
Do you happen to have an example of a module that relies on the |
Thanks, was just looking for a specific component. |
I took a look at this tonight, but looks like it might rely on #4113, which I'm not sure we can address. Open to PRs, if anyone's got them though. |
Describe the bug
The
ElementRef
type is not available yetTo Reproduce
Check this Stackblitz demo where i'm importing the
ElementRef
frompreact
. In the same linerender
is also imported. If you hover overrender
you'll see the type definition of it. But that's not the case forElementRef
. It doesn't show any type definition (idk why Stackblitz isn't showing any error there. but vscode does)Steps to reproduce the behavior:
npm init preact elementRefDemo
Typescript
when askedElementRef
insrc/index.ts
frompreact
orpreact/compact
Expected behavior
ElementRef
should be available inpreact
orpreact/compact
The text was updated successfully, but these errors were encountered: