-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@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< |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
This creates a
CreateEnv
utility type incore/index.ts
. This type is then used to provide an explicit return type for the framework-specificcreateEnv
calls. This would have prevented the Zod 3.23.0 declaration issue.