H
Hono4mo ago
amgau

RPC Type confusion

The RPC package has some unexpected behaviours and I'm hoping someone can give me some insight. This is the return value of the API route (pic 1) and what it's shown as on the other end of RPC (pic 2)
No description
No description
3 Replies
amgau
amgauOP4mo ago
Solved. This was related to a drizzle update, the id being number | bigint seemingly broke the types. adding id as number resolved this.
Mihai Andrei
Mihai Andrei4mo ago
If I remember correctly You need to also check for error In order to narrow the type
nakasyou2
nakasyou24mo ago
I think that this caused by that bigint can't be JSON.
Want results from more Discord servers?
Add your server