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

Function cleanupComponent

packages/debugger/src/structure/walker.ts:64–76  ·  view source on GitHub ↗
(
    r:      ComponentRegistry<TEl>,
    nodeID: NodeID,
)

Source from the content-addressed store, hash-verified

62
63export
64const cleanupComponent = <TEl extends object>(
65 r: ComponentRegistry<TEl>,
66 nodeID: NodeID,
67) => {
68 let component = r.components.get(nodeID)
69 if (component != null) {
70 component.cleanup()
71 r.components.delete(nodeID)
72 for (let element of component.element_nodes) {
73 r.element_nodes.delete(element)
74 }
75 }
76}
77
78const $CLEANUP = Symbol('component-registry-cleanup')
79

Callers 1

registerComponentFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…