( schema: S, options?: SchemaAST.ParseOptions )
| 585 | * @since 4.0.0 |
| 586 | */ |
| 587 | export function encodeUnknownEffect<S extends Schema.Constraint>( |
| 588 | schema: S, |
| 589 | options?: SchemaAST.ParseOptions |
| 590 | ): ( |
| 591 | input: unknown, |
| 592 | options?: SchemaAST.ParseOptions |
| 593 | ) => Effect.Effect<S["Encoded"], SchemaIssue.Issue, S["EncodingServices"]> { |
| 594 | const parser = run<S["Encoded"], S["EncodingServices"]>(SchemaAST.flip(schema.ast)) |
| 595 | return options === undefined |
| 596 | ? parser |
| 597 | : (input, overrideOptions) => parser(input, mergeParseOptions(options, overrideOptions)) |
| 598 | } |
| 599 | |
| 600 | /** |
| 601 | * Creates an effectful encoder for input already typed as the schema's decoded |
no test coverage detected