( f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue, R> )
| 5434 | * @since 4.0.0 |
| 5435 | */ |
| 5436 | export function catchDecodingWithContext<S extends Constraint, R = never>( |
| 5437 | f: (issue: SchemaIssue.Issue) => Effect.Effect<Option_.Option<S["Type"]>, SchemaIssue.Issue, R> |
| 5438 | ) { |
| 5439 | return (self: S): middlewareDecoding<S, S["DecodingServices"] | R> => |
| 5440 | middlewareDecoding<S, S["DecodingServices"] | R>(Effect.catchEager(f))(self) |
| 5441 | } |
| 5442 | |
| 5443 | /** |
| 5444 | * Recovers from an encoding error by providing a fallback value. |
no test coverage detected