andreasA
tRPC7mo ago
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 or
protectedProcedure
method on the client, the types on that procedure are
any
instead of the types returned by t.procedure.

for instance, app.helloWorld.protected_getName will be
any
on the client, but is fully typed on the server.

code in the next msg:
Was this page helpful?