(schema: S)
| 41 | * @since 4.0.0 |
| 42 | */ |
| 43 | export function makeEffect<S extends Schema.Constraint>(schema: S) { |
| 44 | const parser = runWithCompiler<S["Type"], never>(constructorCompiler, SchemaAST.toType(schema.ast)) |
| 45 | return (input: S["~type.make.in"], options?: Schema.MakeOptions): Effect.Effect<S["Type"], SchemaIssue.Issue> => { |
| 46 | return parser( |
| 47 | input, |
| 48 | options?.disableChecks |
| 49 | ? options?.parseOptions ? { ...options.parseOptions, disableChecks: true } : { disableChecks: true } |
| 50 | : options?.parseOptions |
| 51 | ) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Creates a synchronous maker that returns `Option.some` with the constructed |
no test coverage detected