Const
Zod schema for parsing YAML file path input to object. Use .optional() for optional fields.
.optional()
const schema = z.object({ config: zYamlFile });schema.parse({ config: "./config.yaml" }); // { config: { key: "value" } } Copy
const schema = z.object({ config: zYamlFile });schema.parse({ config: "./config.yaml" }); // { config: { key: "value" } }
Zod schema for parsing YAML file path input to object. Use
.optional()for optional fields.