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

Function onParentCleanup

packages/debugger/src/main/utils.ts:259–269  ·  view source on GitHub ↗
(
    owner: Solid.Owner,
    fn: VoidFunction,
    prepend = false,
    symbol?: symbol,
)

Source from the content-addressed store, hash-verified

257 * @returns a function to remove the cleanup callback
258 */
259export function onParentCleanup(
260 owner: Solid.Owner,
261 fn: VoidFunction,
262 prepend = false,
263 symbol?: symbol,
264): VoidFunction {
265 if (owner.owner) return onOwnerCleanup(owner.owner, fn, prepend, symbol)
266 return () => {
267 /* noop */
268 }
269}
270
271/**
272 * Listen to when the owner is disposed. (not on cleanup)

Callers 2

debugComputationFunction · 0.90
onOwnerDisposeFunction · 0.70

Calls 1

onOwnerCleanupFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…