Basic Inference not Working
I have been struggling to get basic type inferencing to work with trpc, react, and Drizzle ORM.
This is what my server-side router is returning from the
list
method:
Where, if I hover over the response
in the return, it says the type is:
However, on my client side, it says the type is any
for the following:
Why is this basic type inferencing not happening?
I am using Drizzle ORM to infer the return type on the router response; could this have something to do with it?
Does trpc not work well with ORM's that use inference?1 Reply
It works if I do the following:
But shouldn't trpc be able to inference it fine without having to force the output type? Seems like it defeats the point of trpc if I have to do that...