FakeTechExec
FakeTechExec10mo ago

Output properties missing on frontend results (Type Infer)

My trpc client is inferring the type without some properties from the object (See images for explenation). The weird part is that the backend infers all the properties correctly (same piece of code) while the frontend is missing quite a few properties (one of them is id). Any idea of what is going on? Here is a list of the things that I have tried so far: - Restart TS Server - Reload VS window - Make sure that the trpc modules have the same version - Make sure that tsconfig.json > "strict": true - Delete and reinstall node_modules - Rewrite the output object: It works! But I want to know why the infer type is not being picked up by my frontend... For reference: I am running a react client on the front and an express server that wraps the trpc implementation. I have been unsuccesful finding a problam similar to mine online and I am running out of ideas, hopefully you will be able to help out, ty!
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin