-
Notifications
You must be signed in to change notification settings - Fork 2
Description
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.

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.