(
f: (input: T, options: SchemaAST.ParseOptions) => Effect.Effect<
undefined | boolean | Schema.FilterIssue,
never,
R
>
)
| 665 | * @since 4.0.0 |
| 666 | */ |
| 667 | export function checkEffect<T, R = never>( |
| 668 | f: (input: T, options: SchemaAST.ParseOptions) => Effect.Effect< |
| 669 | undefined | boolean | Schema.FilterIssue, |
| 670 | never, |
| 671 | R |
| 672 | > |
| 673 | ): Getter<T, T, R> { |
| 674 | return transformEffect((t, options) => { |
| 675 | return f(t, options).pipe(Effect.flatMapEager((out) => { |
| 676 | const issue = SchemaIssue.makeSingle(out, t, options) |
| 677 | return issue ? |
| 678 | Effect.fail(issue) : |
| 679 | Effect.succeed(t) |
| 680 | })) |
| 681 | }) |
| 682 | } |
| 683 | |
| 684 | /** |
| 685 | * Creates a getter that applies a pure function to present values. |
nothing calls this directly
no test coverage detected