import { type ZodType, z } from "zod/v4";

export function ZodValidator<Schema extends ZodType>(
  schema: Schema,
): (input: z.input<Schema>) => z.output<Schema> {
  return (input) => {
    return schema.parse(input);
  };
}
