(exit: Exit.Exit<T, SchemaIssue.Issue>)
| 1036 | } |
| 1037 | |
| 1038 | function exitToOption<T>(exit: Exit.Exit<T, SchemaIssue.Issue>): Option.Option<T> { |
| 1039 | if (Exit.isSuccess(exit)) return Option.some(exit.value) |
| 1040 | InternalSchemaCause.getSchemaIssueOrThrow(exit.cause, "Option adapter can only return none for schema issues") |
| 1041 | return Option.none() |
| 1042 | } |
| 1043 | |
| 1044 | function asResult<T, E, R>( |
| 1045 | parser: (input: E, options?: SchemaAST.ParseOptions) => Effect.Effect<T, SchemaIssue.Issue, R> |