/** * Option refinement utilities for workflow modules * * Provides generic higher-order functions for refining Option types * using Effect Schema validation. */ import { Option as O, Schema } from "effect"; /** * Refine an Option to Option using Schema validation. * Invalid values become O.none. * * The Schema's encoded type (I) determines what input type is accepted. * This provides full type safety without requiring separate functions * for string vs number inputs. * * @example * ```ts * const refineFormat = refineOption(ColorSpaceSchema) * const result = refineFormat(O.some("hex")) // O.some("hex") as Option * const invalid = refineFormat(O.some("invalid")) // O.none * * const refineStop = refineOption(StopPositionSchema) * const result = refineStop(O.some(500)) // O.some(500) as Option * ``` */ export declare const refineOption: (schema: Schema.Schema) => (opt: O.Option) => O.Option; //# sourceMappingURL=optionRefinement.d.ts.map