MCPcopy Index your code
hub / github.com/Effect-TS/effect / validatePromise

Function validatePromise

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

Source from the content-addressed store, hash-verified

638 * @since 3.10.0
639 */
640export const validatePromise = <A, I>(
641 schema: Schema.Schema<A, I, never>,
642 options?: AST.ParseOptions
643) => {
644 const parser = validate(schema, options)
645 return (u: unknown, overrideOptions?: AST.ParseOptions): Promise<A> => Effect.runPromise(parser(u, overrideOptions))
646}
647
648/**
649 * @category validation

Callers

nothing calls this directly

Calls 2

parserFunction · 0.85
validateFunction · 0.70

Tested by

no test coverage detected