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

Function formatCheck

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

Source from the content-addressed store, hash-verified

1096}
1097
1098function formatCheck<T>(check: SchemaAST.Check<T>): string {
1099 const expected = check.annotations?.expected
1100 if (typeof expected === "string") return expected
1101
1102 switch (check._tag) {
1103 case "Filter":
1104 return "<filter>"
1105 case "FilterGroup":
1106 return check.checks.map((check) => formatCheck(check)).join(" & ")
1107 }
1108}
1109
1110/**
1111 * Creates a {@link Formatter} that converts an {@link Issue} into a

Callers 2

toDefaultIssuesFunction · 0.85
formatIssueFunction · 0.85

Calls 2

joinMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected