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

fix: optional Valibot schema #287

Merged
merged 4 commits into from
Oct 14, 2024
Merged

fix: optional Valibot schema #287

merged 4 commits into from
Oct 14, 2024

Conversation

huang-julien
Copy link
Member

@huang-julien huang-julien commented Oct 4, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

@harlan-zw following the discord discussion, this could be a first solution for TPC V3. This would allow to have typesafety but without runtime validation so we don't have to know how TPC or any other type is defined but passing it as a Type Parameter would be enough to warn devs that something is wrong

cc @flashdesignory

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
scripts-docs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 6, 2024 7:56pm
scripts-playground βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 6, 2024 7:56pm

@huang-julien
Copy link
Member Author

The other one is to read the d.ts file exported from TPC, retrieve a TS AST then generate valibot's validation schema with the AST

@harlan-zw harlan-zw changed the title feat: make valibot Object schema optional fix: optional Valibot schema Oct 14, 2024
@harlan-zw harlan-zw merged commit 85f6a18 into main Oct 14, 2024
4 checks passed
@harlan-zw harlan-zw deleted the feat/typevalidation branch October 14, 2024 03:54
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