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

Method kindOfKey

ark/aot/graph.ts:1655–1667  ·  view source on GitHub ↗
(read, origin)

Source from the content-addressed store, hash-verified

1653 const pending: Key[] = [key]
1654 let reader = key
1655 const kindOfKey: KindOfKey = (read, origin) => {
1656 const final = this.kindsByKey.get(read)
1657 if (final !== undefined) return final
1658 let entry = assumed.get(read)
1659 if (!entry) {
1660 assumed.set(read, (entry = [0, origin]))
1661 pending.push(read)
1662 }
1663 let readers = readersByKey.get(read)
1664 if (!readers) readersByKey.set(read, (readers = new Set()))
1665 readers.add(reader)
1666 return entry[0]
1667 }
1668 while (pending.length) {
1669 reader = pending.pop()!
1670 const entry = assumed.get(reader)!

Callers

nothing calls this directly

Calls 4

getMethod · 0.65
setMethod · 0.45
pushMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected