import type { StandardSchemaV1 } from "@standard-schema/spec"; export const optionalBoolean: StandardSchemaV1 = { "~standard": { version: 1, vendor: "configliere", validate(value): StandardSchemaV1.Result { if (value === undefined || value === true || value === false) { return { value }; } return { issues: [{ message: `expected boolean, got ${typeof value}` }], }; }, }, }; export const string: StandardSchemaV1 = { "~standard": { version: 1, vendor: "configliere", validate(value) { if (typeof value === "string") return { value }; return { issues: [{ message: "expected a command name" }] }; }, }, };