Skip to content
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

Export component interfaces #2313

Merged
merged 2 commits into from Aug 31, 2023
Merged

Export component interfaces #2313

merged 2 commits into from Aug 31, 2023

Conversation

thecrypticace
Copy link
Contributor

This isn’t really ideal. We’d rather not export these and instead export implicit function types but TypeScript doesn’t appear to be too happy about trying to do that.

This is a WIP. Would definitely prefer to find a different solution here if possible that fixes the problem but also doesn't increase the surface area of exported types.

Fixes #2306

@vercel
Copy link

vercel bot commented Feb 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 31, 2023 3:31pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 31, 2023 3:31pm

@richardgorman
Copy link

I'm facing the precise problem that this solves. Is there any movement here?

@alexgoff
Copy link

Interested to see this change released as well

@franciscohanna92
Copy link

This change would make building custom primitives really easy. Any estimation on when should we expect this to be merged?

This is not ideal because we don't want these to be public. However, if
you are creating components on top of Headless UI, the TypeScript
compiler needs access to them.

So now they are public in a sense, but you shouldn't be interacting with
them directly.

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript error on "using private name" or "cannot be named"
5 participants