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

Function unreadInputOf

ark/sets/intersections.ts:139–148  ·  view source on GitHub ↗
(node: BaseRoot)

Source from the content-addressed store, hash-verified

137const readingInputOf = new Set<BaseNode>()
138
139const unreadInputOf = (node: BaseRoot): BaseRoot | undefined => {
140 if (!node.hasAlias) return node._in
141 if (readingInputOf.has(node)) return
142 readingInputOf.add(node)
143 try {
144 return node._in
145 } finally {
146 readingInputOf.delete(node)
147 }
148}
149
150// no data reaches both of two Types whose inputs are disjoint, so they are
151// disjoint whatever morphs or defaults they hold. Morphs must be the same,

Callers 1

disjointInputsOfFunction · 0.85

Calls 3

hasMethod · 0.45
addMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected