(schema: S, options?: SchemaAST.ParseOptions)
| 2309 | * @since 4.0.0 |
| 2310 | */ |
| 2311 | export function encodeUnknownSync<S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) { |
| 2312 | const parser = encodeUnknownEffect(schema, options) |
| 2313 | return (input: unknown, options?: SchemaAST.ParseOptions): S["Encoded"] => { |
| 2314 | return runSchemaErrorSync(parser(input, options) as Effect.Effect<S["Encoded"], SchemaError>) |
| 2315 | } |
| 2316 | } |
| 2317 | |
| 2318 | /** |
| 2319 | * Encodes a typed input (the schema's `Type`) against a schema synchronously, |
nothing calls this directly
no test coverage detected