tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.81k stars 1.07k forks source link

Update react types to avoid unbound method lint errors #3480

Closed BrandonGoren closed 1 week ago

BrandonGoren commented 2 weeks ago

Using @headlessui close methods/types in a project with eslint-typescript currently causes "UnboundMethod" errors because we're using class member syntax to define the functions.

I tweaked the declarations here to use arrow syntax in few places. The behavior should be unchanged, but we are no longer implying the existence of a "this"

vercel[bot] commented 2 weeks ago

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 Sep 13, 2024 1:47pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 1:47pm
RobinMalfait commented 1 week ago

Nice one, thanks!