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

Export procedure builder #5444

Closed
wants to merge 7 commits into from
Closed

Conversation

ymc9
Copy link

@ymc9 ymc9 commented Feb 4, 2024

Closes #

🎯 Changes

Add AnyProcedureBuilder type export for properly typing a procedure builder. Useful for declaring factory functions that take t.procedure (or a custom procedure made out of it) as input and return a router record.

This PR is modified from #5443 by @Nick-Lucas .

✅ Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@ymc9 ymc9 requested a review from a team as a code owner February 4, 2024 13:18
Copy link

vercel bot commented Feb 4, 2024

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

Name Status Preview Comments Updated (UTC)
trpc-next-app-dir ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 1:48am
www ❌ Failed (Inspect) Feb 19, 2024 1:48am

Copy link

vercel bot commented Feb 4, 2024

@ymc9 is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

@@ -478,7 +478,7 @@ function ExportStatus<
}

function ExportsList(props: { list: Factory.ExportRouteLike['list'] }) {
const exportsList = props.list.useQuery();
const exportsList = props.list.useQuery({});
Copy link
Contributor

@Nick-Lucas Nick-Lucas Feb 7, 2024

Choose a reason for hiding this comment

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

Hm, that isn’t right. The test was correct, so there’s an issue in the types. I may need to take a look

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants