t
tRPC
public/protectedProcedure returns `any` in client usage - tRPC
A
tRPC
•
11mo ago
•
4 replies
andreas
public/protectedProcedure returns `any` in client usage
Environment
: Node v23
.3
.0 pnpm
Problem
:
hey all
, i
'm having trouble with defining base procedures for my app
.
.
whenever i call a tRPC prodecure that uses a custom
publicProcedure
publicProcedure
or
protectedProcedure
protectedProcedure
method on the client
, the types on that procedure are
any
any
instead of the types returned by
t.procedure
t.procedure
.
for instance
,
app.helloWorld.protected_getName
app.helloWorld.protected_getName
will be
any
any
on the client
, but is fully typed on the server
.
code in the next msg
:
Solution
Fixed
! See
:
Separating routers into their own modules and merging them causes "any" type in client
Jump to solution
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,951
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
tRPC middleware infer type from another protectedProcedure
T
T / ❓-help
3y ago
[Typescript] Client query / mutate has any type
K
Khojo / ❓-help
12mo ago