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

Function flattenInner

ark/sets/constraint.ts:185–190  ·  view source on GitHub ↗
(inner: object)

Source from the content-addressed store, hash-verified

183// a node's inner never changes, so its constraints are ordered once. Each
184// intersection takes a copy to work through
185export const flattenInner = (inner: object): BaseConstraint[] => {
186 let flattened = flattenedByInner.get(inner)
187 if (!flattened)
188 flattenedByInner.set(inner, (flattened = flattenConstraints(inner)))
189 return [...flattened]
190}
191
192export const sortSiblings = <node extends BaseNode>(
193 nodes: readonly node[]

Callers 1

structure.tsFile · 0.90

Calls 3

flattenConstraintsFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected