( schema: S, options?: SchemaAST.ParseOptions )
| 2241 | * @since 3.10.0 |
| 2242 | */ |
| 2243 | export function encodeUnknownPromise<S extends ConstraintEncoder<unknown>>( |
| 2244 | schema: S, |
| 2245 | options?: SchemaAST.ParseOptions |
| 2246 | ) { |
| 2247 | const parser = encodeUnknownEffect(schema, options) |
| 2248 | return (input: unknown, options?: SchemaAST.ParseOptions): Promise<S["Encoded"]> => { |
| 2249 | return runSchemaErrorPromise(parser(input, options)) |
| 2250 | } |
| 2251 | } |
| 2252 | |
| 2253 | /** |
| 2254 | * Encodes a typed input (the schema's `Type`) against a schema, returning a |
no test coverage detected