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

Enable users to define their env var validations #2363

Open
wants to merge 15 commits into
base: miho-zod-env
Choose a base branch
from

Conversation

infomiho
Copy link
Contributor

@infomiho infomiho commented Oct 30, 2024

Caveats:

  • users will need to be careful not to cause circular imports. Ideally they use a file only for env schemas e.g. env.ts
  • user will need to use the EnvValidationFn with satisfies
  • maybe this will clash with Build time validation for client env #2392

@infomiho infomiho mentioned this pull request Nov 26, 2024
5 tasks
@infomiho infomiho marked this pull request as ready for review December 18, 2024 09:34
@Martinsos
Copy link
Member

Caveats:

  • users will need to be careful not to cause circular imports. Ideally they use a file only for env schemas e.g. env.ts
  • user will need to use the EnvValidationFn with satisfies
  • maybe this will clash with Build time validation for client env #2392

@infomiho could you please describe how this works, what is the experience for the user? I see there are no docs yet, and it would help me with reviewing so I don't have to guess it from the code + so I can consider if code does indeed do what the idea was.

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