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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Typings Issue with Headless Select Example in TypeScript #54

Open
alexasselin008 opened this issue Dec 1, 2023 · 1 comment
Open
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@alexasselin008
Copy link
Member

Describe the bug

The example provided in the documentation at https://orbit.sharegate.design/?path=/docs/select--default-story#headless-select cannot be implemented in TypeScript outside the source codebase. After compilation, the typings for triggerProps and overlayProps are incorrectly inferred as "never."

Steps to reproduce

1- In a sandbox, copy this example: https://orbit.sharegate.design/?path=/docs/select--default-story#headless-select.

Expected results

The TypeScript compilation should successfully generate typings for triggerProps and overlayProps based on the provided example, allowing for proper usage in external projects.

Actual Behavior:

After compilation, the typings for triggerProps and overlayProps are incorrectly inferred as "never," causing a compilation error.
image

Workaround:

A workaround for this issue is to apply @ts-ignore when spreading triggerProps and overlayProps in the code. While this resolves the compilation error, it is not an ideal solution as it bypasses TypeScript type checking.

@alexasselin008 alexasselin008 added the bug Something isn't working label Dec 1, 2023
@alexasselin008
Copy link
Member Author

Probably won't fix until we release hopper

@alexasselin008 alexasselin008 added the wontfix This will not be worked on label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant