( schema: S, options?: SchemaAST.ParseOptions )
| 1802 | * @since 3.10.0 |
| 1803 | */ |
| 1804 | export function decodeUnknownPromise<S extends ConstraintDecoder<unknown>>( |
| 1805 | schema: S, |
| 1806 | options?: SchemaAST.ParseOptions |
| 1807 | ) { |
| 1808 | const parser = decodeUnknownEffect(schema, options) |
| 1809 | return (input: unknown, options?: SchemaAST.ParseOptions): Promise<S["Type"]> => { |
| 1810 | return runSchemaErrorPromise(parser(input, options)) |
| 1811 | } |
| 1812 | } |
| 1813 | /** |
| 1814 | * Decodes a typed input (the schema's `Encoded` type) against a schema, |
| 1815 | * returning a `Promise` that resolves with the decoded value or rejects with a |
no test coverage detected