MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / inspectDGraph

Function inspectDGraph

packages/debugger/src/dependency/index.ts:49–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 })
48
49 function inspectDGraph() {
50 // listeners need to be cleared each time, because each update will cause the graph to be mapped again
51 clearListeners?.()
52
53 let node = inspectedNode()
54
55 if (!props.enabled() ||
56 !node ||
57 node.kind === NodeType.Root ||
58 node.kind === NodeType.Component ||
59 node.kind === NodeType.Context
60 ) {
61 clearListeners = null
62 props.emit(msg('DgraphUpdate', null))
63 return
64 }
65
66 const dgraph = collectDependencyGraph(node.data as any, {
67 onNodeUpdate,
68 })
69 clearListeners = dgraph.clearListeners
70 props.emit(msg('DgraphUpdate', dgraph.graph))
71 }
72 const triggerInspect = throttle(inspectDGraph, 200)
73
74 s.createEffect(

Callers 1

onViewChangeFunction · 0.85

Calls 3

msgFunction · 0.90
collectDependencyGraphFunction · 0.90
clearListenersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…