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

Function arrayFacts

ark/type/deferred.ts:411–422  ·  view source on GitHub ↗
(element: Facts)

Source from the content-addressed store, hash-verified

409const wrap = (f: Facts) => (f.terms ? `(${f.key})` : f.key)
410
411const arrayFacts = (element: Facts): Facts => {
412 const of = `${wrap(element)}[]`
413 return {
414 key: of,
415 domains: objectBits,
416 pure: element.pure,
417 cyclic: element.cyclic,
418 base: "array",
419 of,
420 ...holding(element)
421 }
422}
423
424const scanTerm = (def: string): Facts | undefined => {
425 if (stringLiteral.test(def)) {

Callers 3

scanTermFunction · 0.85
valueFactsFunction · 0.85
deferred.tsFile · 0.85

Calls 2

holdingFunction · 0.85
wrapFunction · 0.70

Tested by

no test coverage detected