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

Method checks

ark/schema/roots/intersection.ts:357–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

355 }
356 const sequence = this.inlinedSequence
357 const checks = () => {
358 for (const child of this.children) {
359 // the last child, returning true once each element is allowed
360 if (child === this.structure && sequence) {
361 sequence.compile(js)
362 return js
363 }
364 if (child !== this.basis || !read)
365 js.check(child, { breaks: !js.shortest })
366 else {
367 js.rejectNullish(this)
368 .line(`data${js.prop(read.key)}`)
369 .if(`!${objectCondition}`, () => js.return(false))
370 }
371 }
372 return js.return(true)
373 }
374 const rejection = js.rejection(this)
375 // a loop keeps a minifier from joining the checks into one expression,
376 // which a build for size allows

Callers

nothing calls this directly

Calls 6

ifMethod · 0.80
lineMethod · 0.80
propMethod · 0.80
returnMethod · 0.80
compileMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected