-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Fixes TS annotation issue #366
Fixes TS annotation issue #366
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Where does this error come from? The types you've added exports for don't seem like types that should be exported. |
This error is in an internal package that I built at my company that uses shadcn, which uses this package (https://ui.shadcn.com/docs/components/resizable). Our internal package uses vite to bundle up our customized version:
I thought it made sense to just expose all of the types at the same time, but I could pair this back too. |
Thanks for the extra context. that's helpful. What would be the minimal set of types needing to be exported to fix the error you are referencing? |
I quickly checked and that would be: import type { PointerHitAreaMargins } from "./PanelResizeHandleRegistry.js";
export { PointerHitAreaMargins } I believe the reason for this is that |
Interesting. Okay. Can you update this PR to just make the minimal change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
CI is complaining about formatting. Mind running |
Got it 👍 |
Version 2.0.20 just deployed with this change. |
This fixes
The inferred type of 'ResizableHandle' cannot be named without a reference to 'react-resizable-panels/dist/declarations/src/PanelResizeHandleRegistry'. This is likely not portable. A type annotation is necessary.
I've exported out types not currently exported from
index.ts
. This resolves the issue that there were internal types not exported resolving annotation issues forPanelResizeHandle
. I created a build to verify this as well https://www.npmjs.com/package/@akkuma/react-resizable-panels.