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

Method deepest

ark/aot/sameEachRun.ts:305–318  ·  view source on GitHub ↗
(nodes: readonly (Node | null)[])

Source from the content-addressed store, hash-verified

303 ): number | undefined {
304 const node = unwrapExpression(expression)
305 const deepest = (nodes: readonly (Node | null)[]) => {
306 let depth = 0
307 for (const operand of nodes) {
308 if (!operand) continue
309 const held = this.fixedDepthOf(
310 operand.type === "SpreadElement" ? operand.argument : operand,
311 module,
312 seen
313 )
314 if (held === undefined) return
315 depth = Math.max(depth, held)
316 }
317 return depth
318 }
319 const holding = (nodes: readonly (Node | null)[]) => {
320 const depth = deepest(nodes)
321 return depth === undefined ? undefined : depth + 1

Callers

nothing calls this directly

Calls 1

fixedDepthOfMethod · 0.95

Tested by

no test coverage detected