export interface TestManualInterface { first_name: string; } export const testManualInterfaceSchema = z.object({ first_name: z.string() }); export interface TestInferredInterface extends z.output<typeof testManualInterfaceSchema> {}
const testManualInterface = publicProcedure.query(async ({ input }) => { return { first_name: "Test Build 1" } as TestManualInterface; }); const testInferredInterface = publicProcedure.query(async ({ input }) => { return { first_name: "Test Build 1" } as TestInferredInterface; });
let testManualInterface = trpc.builds.testManualInterface.query(); let testInferredInterface = trpc.builds.testInferredInterface.query();
.testManualInterface
output: {first_name: string}
.testInferredInterface
output: TestInferredInterface
The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.
{....}