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

Function formatCheck

packages/effect/src/SchemaIssue.ts:1377–1387  ·  view source on GitHub ↗
(check: SchemaAST.Check<T>)

Source from the content-addressed store, hash-verified

1375}
1376
1377function formatCheck<T>(check: SchemaAST.Check<T>): string {
1378 const expected = check.annotations?.expected
1379 if (typeof expected === "string") return expected
1380
1381 switch (check._tag) {
1382 case "Filter":
1383 return "<filter>"
1384 case "FilterGroup":
1385 return check.checks.map((check) => formatCheck(check)).join(" & ")
1386 }
1387}
1388
1389/**
1390 * Creates a {@link Formatter} that converts an {@link Issue} into a

Callers 1

getFilterMessageFunction · 0.85

Calls 2

joinMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected