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

[drizzle-zod] refactor columnToSchema function to use early return #4343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

valerii15298
Copy link

Just added early return to columnToSchema function. Because earlier schema variable was used declared with let it was not clear if it was modified in some places without reading code. Using early return it is explicit right away what it returned.

Code logic not changed.

I also noticed that other integrations with valibot and arktype use same approach, so I can add similar commits for them in this PR if such refactor is acceptable.

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.

1 participant