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

Function decodePromise

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

Source from the content-addressed store, hash-verified

366 * @since 3.10.0
367 */
368export function decodePromise<S extends Schema.ConstraintDecoder<unknown>>(
369 schema: S,
370 options?: SchemaAST.ParseOptions
371): (input: S["Encoded"], options?: SchemaAST.ParseOptions) => Promise<S["Type"]> {
372 return asPromise(decodeEffect(schema, options))
373}
374
375/**
376 * Creates a synchronous decoder for `unknown` input that reports failure safely

Callers

nothing calls this directly

Calls 2

asPromiseFunction · 0.85
decodeEffectFunction · 0.50

Tested by

no test coverage detected