Closed david-arteaga closed 7 hours ago
Thanks for looking into this. I would like to be able to switch between them. If you have half working changes, want to open a draft PR? If not I can just apply what you described here.
Yeah switching would be great.
I don't have any other changes, just what I described above, but I'm thinking that won't even get past typescript compilation.
Currently the trpc docs quickstart instructs developers to install
@trpc/server@next
when setting up. This currently installs@trpc/server@11
, which doesn't seem to be compatible with this library.I tried running it with v11 and got a pretty useless stack trace:
Dug around for a bit and it seems the main issue is with how procedures are called, specifically this line in
index.ts
:I fixed it by changing it (in the build
dist/index.js
) from:to
And that seems to fix it for v11 (I'm using
11.0.0-rc.498
exactly). It still works with nested sub-routers and the dot separation convention.There are still several type errors since several types have been deprecated/changed in v11, but that doesn't prevent the code from running, which was my immediate goal in fixing this.
So just leaving this here to document what I found and hopefully make it easier to implement support for
@trpc/server@11
.