Define a single RPC method with schema-first validation. Types are inferred from the schemas — no separate type definition needed.
const echo = defineMethod( { input: z.tuple([z.string()]), output: z.string() }, async (message) => message) Copy
const echo = defineMethod( { input: z.tuple([z.string()]), output: z.string() }, async (message) => message)
Define a single RPC method with schema-first validation. Types are inferred from the schemas — no separate type definition needed.