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

Function logOwned

packages/logger/src/log.ts:196–223  ·  view source on GitHub ↗
(
    ownerState: NodeState,
    owned: Readonly<Solid.Computation[]>,
    prevOwned: Readonly<Solid.Computation[]>,
)

Source from the content-addressed store, hash-verified

194}
195
196export function logOwned(
197 ownerState: NodeState,
198 owned: Readonly<Solid.Computation[]>,
199 prevOwned: Readonly<Solid.Computation[]>,
200): void {
201 console.groupCollapsed(
202 `Owned by the %c${ownerState.name}%c ${ownerState.typeName}:`,
203 STYLES.ownerName,
204 '',
205 owned.length,
206 )
207
208 logOwnersDiff(prevOwned, owned, 'stack', owner => {
209 const sources = owner.sources ? array.deduped(owner.sources) : []
210 const usesPrev = !!owner.fn.length
211 const usesValue = usesPrev || isSolidMemo(owner)
212 logComputationDetails({
213 owner: ownerState,
214 owned: owner.owned ?? [],
215 sources,
216 prev: UNUSED,
217 value: usesValue ? owner.value : UNUSED,
218 causedBy: null,
219 })
220 })
221
222 console.groupEnd()
223}
224
225export function logSignalsInitialValues(signals: Solid.Signal[]): void {
226 console.groupCollapsed('Signals initial values:')

Callers 1

debugOwnerComputationsFunction · 0.90

Calls 3

isSolidMemoFunction · 0.90
logOwnersDiffFunction · 0.85
logComputationDetailsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…