TRPC type aliasing
I have these two interfaces set up. One manually defined with TS interface and one using the output of a Zod schema
i have these 2 procs set up - one returning the manual interface and the other returning the inferred interface
In a trpc client i have
when i hover
.testManualInterface i get output: {first_name: string}
when i hover .testInferredInterface i get output: TestInferredInterface
why is this the case? why isnt the .testManualInterface using the alias as the output?
I am running into an issue where a TRPC proc is returnin a large interface, so i get TS compilation error
I am trying to fix this by having the function return the alias instead of the expanded {....}, but not sure why TRPC converts the non Zod-inferred interfaces into the expanded object type definition vs the alias
I want to avoid turning my large interface type into a Zod type just to avoid this error

1 Reply
Essentially I want the TRPC proc to return
output: TestManualInterface not output: {first_name: string}