* Validates input parameters using a Zod schema. * * @see https://jstack.app/docs/backend/procedures#input-validation * @param schema - A Zod schema to validate input parameters * * @example * ```ts * const router = j.router({ * hello: publicProcedure * .input(z.ob
(schema: Schema)
| 157 | * ``` |
| 158 | */ |
| 159 | input<Schema extends z.ZodTypeAny>(schema: Schema) { |
| 160 | return new Procedure<E, Ctx, Schema, Incoming, Outgoing>( |
| 161 | this.middlewares, |
| 162 | schema, |
| 163 | this.incomingSchema, |
| 164 | this.outgoingSchema, |
| 165 | ) |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * Adds a middleware function to the procedure chain. |
no outgoing calls
no test coverage detected