adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.73k stars 1.09k forks source link

Set default value for type parameter in SelectProps #7014

Open kp047i opened 2 weeks ago

kp047i commented 2 weeks ago

Closes #6960

✅ Pull Request Checklist:

📝 Test Instructions:

🧢 Your Project:

kp047i commented 1 week ago

@snowystinger I tried using overload syntax to deprecate only the function signatures where a type parameter is provided, but I couldn’t get it to work. Here’s my attempt: TypeScript Playground.

Could you check if my approach is correct, and let me know if there’s a better way to achieve this?

Thanks!