(schema: S, options?: SchemaAST.ParseOptions)
| 2285 | * @since 4.0.0 |
| 2286 | */ |
| 2287 | export function encodeUnknownSync<S extends ConstraintEncoder<unknown>>(schema: S, options?: SchemaAST.ParseOptions) { |
| 2288 | const parser = encodeUnknownEffect(schema, options) |
| 2289 | return (input: unknown, options?: SchemaAST.ParseOptions): S["Encoded"] => { |
| 2290 | return runSchemaErrorSync(parser(input, options) as Effect.Effect<S["Encoded"], SchemaError>) |
| 2291 | } |
| 2292 | } |
| 2293 | /** |
| 2294 | * Encodes a typed input (the schema's `Type`) against a schema synchronously, |
| 2295 | * throwing a {@link SchemaError} for schema mismatches. |
nothing calls this directly
no test coverage detected