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

Update react types to avoid unbound method lint errors #3480

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

BrandonGoren
Copy link
Contributor

@BrandonGoren BrandonGoren commented Sep 13, 2024

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"

Copy link

vercel bot commented Sep 13, 2024

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

@BrandonGoren BrandonGoren changed the title Update react types to avoid unbound method errors Update react types to avoid unbound method lint errors Sep 13, 2024
@RobinMalfait RobinMalfait merged commit 5ca68a9 into tailwindlabs:main Sep 23, 2024
7 checks passed
@RobinMalfait
Copy link
Member

Nice one, thanks!

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.

2 participants