MCPcopy Create free account
hub / github.com/arktypeio/arktype / jsConjunction

Method jsConjunction

ark/schema/structure/structure.ts:1139–1147  ·  view source on GitHub ↗

writes its check as one condition: with nothing to loop over, it holds while each child does

(js: NodeCompiler)

Source from the content-addressed store, hash-verified

1137
1138 /** writes its check as one condition: with nothing to loop over, it holds while each child does */
1139 jsConjunction(js: NodeCompiler): string | undefined {
1140 if (js.trav === "Transform" || this.index || this.undeclared === "reject")
1141 return
1142 const children = [
1143 ...this.propsOf(js),
1144 ...(this.sequence ? [this.sequence] : [])
1145 ]
1146 return children.map(child => js.inv(child)).join(" && ") || "true"
1147 }
1148
1149 /** writes its Transform */
1150 private jsTf(js: NodeCompiler): void {

Callers 2

compileMethod · 0.95
invMethod · 0.80

Calls 3

propsOfMethod · 0.95
mapMethod · 0.65
invMethod · 0.45

Tested by

no test coverage detected