-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(server): add inferProcedureBuilderResolverOptions
helper
#5475
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@dBianchii is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
|
||
export type inferProcedureBuilderContext< | ||
TProcedureBuilder extends AnyProcedureBuilder, | ||
> = Parameters<Parameters<TProcedureBuilder['mutation']>[0]>[0]['ctx']; |
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.
Looks weird to get the 'mutation' here directly. But it is what seemed to have worked correctly.
Hi, would just like to point out that this is my first time contributing here. Want to make sure I follow all the guidelines. Please let me know if anything's missing |
# Conflicts: # pnpm-lock.yaml
inferProcedureBuilderResolverOptions
helper
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Closes #5473
🎯 Changes
Added
inferProcedureBuilderContext
type helper export for infering the context type of a specific procedure builder.Added an example of how to use it on examples/next-big-router
Simplified internal code to use a single
AnyProcedureBuilder
exported type without redeclaration✅ Checklist
I will gladly add documentation for it. However, I want to start working on docs only if maintainers decide this is something we're going to add to trpc