MCPcopy Create free account
hub / github.com/Effect-TS/effect / decodeUnknownPromise

Function decodeUnknownPromise

packages/effect/src/Schema.ts:1828–1836  ·  view source on GitHub ↗
(
  schema: S,
  options?: SchemaAST.ParseOptions
)

Source from the content-addressed store, hash-verified

1826 * @since 3.10.0
1827 */
1828export function decodeUnknownPromise<S extends ConstraintDecoder<unknown>>(
1829 schema: S,
1830 options?: SchemaAST.ParseOptions
1831) {
1832 const parser = decodeUnknownEffect(schema, options)
1833 return (input: unknown, options?: SchemaAST.ParseOptions): Promise<S["Type"]> => {
1834 return runSchemaErrorPromise(parser(input, options))
1835 }
1836}
1837
1838/**
1839 * Decodes a typed input (the schema's `Encoded` type) against a schema,

Callers 1

Schema.test.tsFile · 0.50

Calls 2

runSchemaErrorPromiseFunction · 0.85
decodeUnknownEffectFunction · 0.70

Tested by

no test coverage detected