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

Function mapChildren

packages/debugger/src/structure/walker.ts:288–309  ·  view source on GitHub ↗
(
    owner:        Solid.Owner,
    component_id: NodeID | null,
    config:       TreeWalkerConfig<TEl>,
    children:     Mapped.Owner[] = [],
)

Source from the content-addressed store, hash-verified

286}
287
288function mapChildren<TEl extends object>(
289 owner: Solid.Owner,
290 component_id: NodeID | null,
291 config: TreeWalkerConfig<TEl>,
292 children: Mapped.Owner[] = [],
293): Mapped.Owner[] {
294
295 for (let child of owner_each_child(owner)) {
296 if (config.mode === TreeWalkerMode.Owners ||
297 markOwnerType(child) === NodeType.Component
298 ) {
299 unwrap_append(children, mapOwner(child, component_id, config))
300 } else {
301 if (isSolidComputation(child)) {
302 observeComputation(child, owner, config)
303 }
304 mapChildren(child, component_id, config, children)
305 }
306 }
307
308 return children
309}
310
311let els_seen = new Set<object>()
312

Callers 1

mapOwnerFunction · 0.85

Calls 6

owner_each_childFunction · 0.90
markOwnerTypeFunction · 0.90
unwrap_appendFunction · 0.90
isSolidComputationFunction · 0.90
mapOwnerFunction · 0.85
observeComputationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…