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

Method nodeValue

ark/aot/interpreter.ts:1685–1698  ·  view source on GitHub ↗
(node: Node, module: SourceModule)

Source from the content-addressed store, hash-verified

1683 }
1684
1685 private nodeValue(node: Node, module: SourceModule): Evaluated {
1686 let result = this.valuesByNode.get(node)
1687 if (result) return result
1688 this.registerSites?.(module)
1689 const ctx = rootContext(module, node)
1690 try {
1691 result = { value: this.evaluate(node, ctx), trace: ctx.trace }
1692 } catch (e) {
1693 result = { value: undefined, trace: ctx.trace, error: e }
1694 }
1695 this.markDeclared(result, node, module)
1696 this.valuesByNode.set(node, result)
1697 return result
1698 }
1699
1700 private declaredValue(binding: Binding, ctx: Context): unknown {
1701 const declarator = binding.declaration

Callers 2

exportValueMethod · 0.95
declaredValueMethod · 0.95

Calls 5

evaluateMethod · 0.95
markDeclaredMethod · 0.95
rootContextFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected