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

Function decodePromise

packages/effect/src/SchemaParser.ts:341–346  ·  view source on GitHub ↗
(
  schema: S,
  options?: SchemaAST.ParseOptions
)

Source from the content-addressed store, hash-verified

339 * @since 3.10.0
340 */
341export function decodePromise<S extends Schema.ConstraintDecoder<unknown>>(
342 schema: S,
343 options?: SchemaAST.ParseOptions
344): (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Promise<S["Type"]> {
345 return asPromise(decodeEffect(schema, options))
346}
347
348/**
349 * Creates a synchronous decoder for `unknown` input that reports failure safely

Callers

nothing calls this directly

Calls 1

asPromiseFunction · 0.85

Tested by

no test coverage detected