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

Function validate

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

Source from the content-addressed store, hash-verified

650 * @since 3.10.0
651 */
652export const validate = <A, I, R>(
653 schema: Schema.Schema<A, I, R>,
654 options?: AST.ParseOptions
655): (a: unknown, overrideOptions?: AST.ParseOptions) => Effect.Effect<A, ParseIssue, R> =>
656 getEffect(AST.typeAST(schema.ast), true, options)
657
658/**
659 * By default the option `exact` is set to `true`.

Callers 1

validatePromiseFunction · 0.70

Calls 1

getEffectFunction · 0.85

Tested by

no test coverage detected