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

Add explicit return types #224

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

colinhacks
Copy link
Contributor

@colinhacks colinhacks commented Apr 22, 2024

This creates a CreateEnv utility type in core/index.ts. This type is then used to provide an explicit return type for the framework-specific createEnv calls. This would have prevented the Zod 3.23.0 declaration issue.

Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
t3-env ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 7:32am

Copy link

vercel bot commented Apr 22, 2024

@colinhacks is attempting to deploy a commit to the t3-oss Team on Vercel.

A member of the Team first needs to authorize it.

@@ -18,10 +18,15 @@ type Options<

export function createEnv<
TServer extends Record<string, ZodType> = NonNullable<unknown>,
TClient extends Record<string, ZodType> = NonNullable<unknown>,
TClient extends Record<
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this to agree with the Next.js behavior (enforcing the prefix). Feel free to undo if there was a reason for this decision.

Copy link
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@juliusmarminge juliusmarminge added this pull request to the merge queue Apr 23, 2024
Merged via the queue into t3-oss:main with commit bed246c Apr 23, 2024
5 of 6 checks passed
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