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

Extract assert #3226

Closed
wants to merge 1 commit into from
Closed

Extract assert #3226

wants to merge 1 commit into from

Conversation

pvorona
Copy link

@pvorona pvorona commented May 22, 2024

Extract assert utility to reduce duplication and simplify the code. Similar changes can be made in vue package.

This PR does not introduce any new functionality and does not fix any issues.

Copy link

vercel bot commented May 22, 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 May 22, 2024 7:07am
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 7:07am

@RobinMalfait
Copy link
Member

Hey!

I appreciate the PR, but going to close it for now because I'm not sure if the additional level of indirection is really worth it.

While the assert function can be useful, it also deviates from typical assert implementations (where you don't pass through the parent function to improve the stack trace).

So again I appreciate the PR, but going to close this for now.

@pvorona pvorona deleted the extract-assert branch May 22, 2024 22:37
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