TypeError: c.header is not a function. (In 'c.header("Set-Cookie", cookie, { append: !0 })', 'c.header' is undefined)
const t = initTRPC.context<Context>().create();const publicProcedure = t.procedure;const router = t.router;export const authRouter = router({ register: publicProcedure.mutation(async ({ ctx }) => { const token = "exampleToken"; // Example token generation setCookie(ctx, "token", token, { path: "/", secure: process.env.NODE_ENV === "production", httpOnly: true, maxAge: 60 * 60 * 24 * 30, sameSite: "Lax", }); return { message: "Registration successful!" }; }),});