stuS
tRPC14mo ago
26 replies
stu

procedure output is "any"

I have a problem with the procedure output type. Procedure input types are all correct, but the output type is "any."
The server type is correct, but not on inferRouterClient<AppRouter>

I'm using 11.0.0-rc.648 and zod ^3.23.8

here's what I got
inferRouterClient<AppRouter>
type Client = {
    register: {
        mutate: Resolver<{
            input: {
                name: string;
                email: string;
                password: string;
            };
            output: any;
            errorShape: DefaultErrorShape;
            transformer: false;
        }>;
    };
    login: {
        ...;
    };
    ... 22 more ...;
    candidateDocuments: {
        ...;
    };
}

register procedure
export const register = publicProcedure
    .input(
        z.object({
            name: z.string(),
            email: z.string(),
            password: z.string(),
        })
    )
    .output(z.boolean())
    .mutation(async ({ input: { name, email, password } }) => {
// ------
    });
Was this page helpful?