import { z } from 'zod'; // Monkey-patch zod to support aliases declare module 'zod' { interface ZodType { alias(this: T, aliasName: string): T; } interface ZodTypeDef { _alias: string; } } z.ZodType.prototype.alias = function (this: T, aliasName: string) { this._def._alias = aliasName; return this; };