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

Function runChecks

packages/effect/src/SchemaAST.ts:4071–4081  ·  view source on GitHub ↗
(
  checks: readonly [Check<T>, ...Array<Check<T>>],
  s: T
)

Source from the content-addressed store, hash-verified

4069
4070/** @internal */
4071export function runChecks<T>(
4072 checks: readonly [Check<T>, ...Array<Check<T>>],
4073 s: T
4074): Result.Result<T, SchemaIssue.Issue> {
4075 const issues = collectIssues(checks, s, undefined, unknown, { errors: "all" })
4076 if (issues) {
4077 const issue = new SchemaIssue.Composite(unknown, issues)
4078 return Result.fail(issue)
4079 }
4080 return Result.succeed(s)
4081}
4082
4083/** @internal */
4084export interface ConstructorDescriptor {

Callers

nothing calls this directly

Calls 3

collectIssuesFunction · 0.85
failMethod · 0.45
succeedMethod · 0.45

Tested by

no test coverage detected