(schema: S, options?: SchemaAST.ParseOptions)
| 1950 | * @since 4.0.0 |
| 1951 | */ |
| 1952 | export function encodeUnknownEffect<S extends Constraint>(schema: S, options?: SchemaAST.ParseOptions) { |
| 1953 | const parser = SchemaParser.encodeUnknownEffect(schema, options) |
| 1954 | return ( |
| 1955 | input: unknown, |
| 1956 | options?: SchemaAST.ParseOptions |
| 1957 | ): Effect.Effect<S["Encoded"], SchemaError, S["EncodingServices"]> => { |
| 1958 | return fromIssueEffect(parser(input, options)) |
| 1959 | } |
| 1960 | } |
| 1961 | /** |
| 1962 | * Encodes a typed input (the schema's `Type`) against a schema, returning an |
| 1963 | * `Effect` that succeeds with the encoded value or fails with a |
no test coverage detected