MCPcopy
hub / github.com/Effect-TS/effect / decodeUnknownPromise

Function decodeUnknownPromise

packages/effect/src/ParseResult.ts:492–498  ·  view source on GitHub ↗
(
  schema: Schema.Schema<A, I, never>,
  options?: AST.ParseOptions
)

Source from the content-addressed store, hash-verified

490 * @since 3.10.0
491 */
492export const decodeUnknownPromise = <A, I>(
493 schema: Schema.Schema<A, I, never>,
494 options?: AST.ParseOptions
495) => {
496 const parser = decodeUnknown(schema, options)
497 return (u: unknown, overrideOptions?: AST.ParseOptions): Promise<A> => Effect.runPromise(parser(u, overrideOptions))
498}
499
500/**
501 * @category decoding

Callers

nothing calls this directly

Calls 2

parserFunction · 0.85
decodeUnknownFunction · 0.70

Tested by

no test coverage detected