{"version":3,"file":"undefined.mjs","names":[],"sources":["../../src/schemas/undefined.ts"],"sourcesContent":["import { BaseSchema } from \"../core/base\";\nimport type { CombinedStandardProps } from \"../core/types\";\n\nexport class UndefinedSchemaType extends BaseSchema<unknown, undefined> {\n  constructor() {\n    super();\n    this.jsonSchema = { type: \"undefined\" };\n  }\n\n  get [\"~standard\"](): CombinedStandardProps<unknown, undefined> {\n    return {\n      version: 1,\n      vendor: \"h-schema\",\n      jsonSchema: {\n        input: () => this.jsonSchema,\n        output: () => this.jsonSchema,\n      },\n      validate: (value: unknown) => {\n        if (value !== undefined) {\n          return { issues: [{ message: `Expected undefined, received ${typeof value}` }] };\n        }\n        return { value: undefined };\n      },\n      types: {\n        input: {} as unknown,\n        output: undefined as undefined,\n      },\n    };\n  }\n}\n\nexport class VoidSchemaType extends BaseSchema<unknown, void> {\n  constructor() {\n    super();\n    this.jsonSchema = { type: \"undefined\" };\n  }\n\n  get [\"~standard\"](): CombinedStandardProps<unknown, void> {\n    return {\n      version: 1,\n      vendor: \"h-schema\",\n      jsonSchema: {\n        input: () => this.jsonSchema,\n        output: () => this.jsonSchema,\n      },\n      validate: (value: unknown) => {\n        if (value !== undefined) {\n          return { issues: [{ message: `Expected void/undefined, received ${typeof value}` }] };\n        }\n        return { value: undefined };\n      },\n      types: {\n        input: {} as unknown,\n        output: undefined,\n      },\n    };\n  }\n}\n"],"mappings":";;AAGA,IAAa,sBAAb,cAAyC,WAA+B;CACtE,cAAc;EACZ,MAAM;EACN,KAAK,aAAa,EAAE,MAAM,YAAY;CACxC;CAEA,KAAK,eAA0D;EAC7D,OAAO;GACL,SAAS;GACT,QAAQ;GACR,YAAY;IACV,aAAa,KAAK;IAClB,cAAc,KAAK;GACrB;GACA,WAAW,UAAmB;IAC5B,IAAI,UAAU,KAAA,GACZ,OAAO,EAAE,QAAQ,CAAC,EAAE,SAAS,gCAAgC,OAAO,QAAQ,CAAC,EAAE;IAEjF,OAAO,EAAE,OAAO,KAAA,EAAU;GAC5B;GACA,OAAO;IACL,OAAO,CAAC;IACR,QAAQ,KAAA;GACV;EACF;CACF;AACF;AAEA,IAAa,iBAAb,cAAoC,WAA0B;CAC5D,cAAc;EACZ,MAAM;EACN,KAAK,aAAa,EAAE,MAAM,YAAY;CACxC;CAEA,KAAK,eAAqD;EACxD,OAAO;GACL,SAAS;GACT,QAAQ;GACR,YAAY;IACV,aAAa,KAAK;IAClB,cAAc,KAAK;GACrB;GACA,WAAW,UAAmB;IAC5B,IAAI,UAAU,KAAA,GACZ,OAAO,EAAE,QAAQ,CAAC,EAAE,SAAS,qCAAqC,OAAO,QAAQ,CAAC,EAAE;IAEtF,OAAO,EAAE,OAAO,KAAA,EAAU;GAC5B;GACA,OAAO;IACL,OAAO,CAAC;IACR,QAAQ,KAAA;GACV;EACF;CACF;AACF"}