bug: inference errors in middleware and context
Problem
Provide environment information System: OS: macOS 13.6.2 CPU: (10) arm64 Apple M1 Pro Memory: 117.69 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm pnpm: 8.2.0 - ~/Library/pnpm/pnpm Browsers: Brave Browser: 115.1.56.20 Chrome: 119.0.6045.123 Chrome Canary: 121.0.6127.0 Safari: 17.1 npmPackages: @trpc/client: 10.43.2 => 10.43.2 @trpc/react-query: 10.43.2 => 10.43.2 @trpc/server: 10.43.2 => 10.43.2 typescript: ^5.2.2 => 5.2.2 Describe the bug Hard to explain but I have this code: (create-context.ts) [code block] And this wrapper for creating trpc (make-trpc.ts): [code block] This works fine in @trpc/server version 10.43.2, however, when upgrading to 10.43.3 I am getting the following error: [code block] <img width="1254" alt="CleanShot 2023-11-14 at 17 05 09@2x" src="https://github.com/trpc/trpc/assets/9701896/8c9ffba8-47cb-4c7b-a592-f93bcdd1228f"> Link to reproduction https://stackblitz.com/github/trpc/examples-next-minimal-starter To reproduce Sorry wasn't able to easily reproduce it in a new repo. Additional information _No response_ ๐จโ๐งโ๐ฆ Contributing - [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: bug: inference errors in middleware and context
Maybe related to this: https://github.com/trpc/trpc/pull/5017
Trust Score
1 verification
- 1
Maybe related to this:
https://github.com/trpc/trpc/pull/5017
Validation
Resolved in trpc/trpc GitHub issue #5037. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep