You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the opts passed in from the trpc-server package is of type incompatible with the CreateNextContextOptions param as documented here
What is the expected behavior?
I expect the types for opts to match the types for the createContext of trpc.
What do you see instead?
Type types do not match
src/main.ts:36:47 - error TS2345: Argument of type 'FetchCreateContextFnOptions' is not assignable to parameter of type 'CreateNextContextOptions'.
Property 'res' is missing in type 'FetchCreateContextFnOptions' but required in type 'CreateNextContextOptions'.
36 createContext: (opts, c) => createContext(opts),
~~~~
../node_modules/.pnpm/@[email protected]/node_modules/@trpc/server/dist/adapters/node-http/types.d.ts:68:5
68 res: TResponse;
~~~
'res' is declared here.
Additional information
I'm using trpc v10
The text was updated successfully, but these errors were encountered:
Which middleware has the bug?
@hono/trpc-server
What version of the middleware?
^0.3.4
What version of Hono are you using?
^4.6.15
What runtime/platform is your app running on? (with version if possible)
node 20
What steps can reproduce the bug?
I'm using trpcServer like so
I have the trpc createContext function defined like so
It seems that the
opts
passed in from the trpc-server package is of type incompatible with theCreateNextContextOptions
param as documented hereWhat is the expected behavior?
I expect the types for
opts
to match the types for thecreateContext
of trpc.What do you see instead?
Type types do not match
Additional information
I'm using trpc v10
The text was updated successfully, but these errors were encountered: