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

Function add

ark/aot/graph.ts:6450–6452  ·  view source on GitHub ↗
(name: unknown, ...values: Node[])

Source from the content-addressed store, hash-verified

6448 if (cached) return cached
6449 const result: Record<string, Node[]> = Object.create(null)
6450 const add = (name: unknown, ...values: Node[]) => {
6451 if (typeof name === "string") (result[name] ??= []).push(...values)
6452 }
6453 walk(cls, node => {
6454 if (node.type === "PropertyDefinition" && !node.static && node.value)
6455 add(keyNameOf(node), node.value)

Callers 2

linkImportersMethod · 0.70
fieldValuesOfFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected