hashwarp
hashwarp4mo ago

Type too complex to infer?

Hey, I have a working router where types are infered properly, but no matter what I try I can't get this one to work
No description
No description
4 Replies
hashwarp
hashwarpOP4mo ago
But this one works
No description
hashwarp
hashwarpOP4mo ago
infers properly for that one
No description
hashwarp
hashwarpOP4mo ago
I defined a .output and when I hover that, it shows the correct type, but when I import it, its still unknown[]
No description
No description
hashwarp
hashwarpOP4mo ago
it's working when I cast it on the other side, but that kind of defeats the purpose of trpc 😄 const { data: eras } = trpc.game.eras.useQuery<Era[]>();

Did you find this page helpful?