MCPcopy
hub / github.com/vuejs/core / prepareDeps

Function prepareDeps

packages/reactivity/src/effect.ts:312–322  ·  view source on GitHub ↗
(sub: Subscriber)

Source from the content-addressed store, hash-verified

310}
311
312function prepareDeps(sub: Subscriber) {
313 // Prepare deps for tracking, starting from the head
314 for (let link = sub.deps; link; link = link.nextDep) {
315 // set all previous deps' (if any) version to -1 so that we can track
316 // which ones are unused after the run
317 link.version = -1
318 // store previous active sub if link was being used in another context
319 link.prevActiveLink = link.dep.activeLink
320 link.dep.activeLink = link
321 }
322}
323
324function cleanupDeps(sub: Subscriber) {
325 // Cleanup unused deps

Callers 2

runMethod · 0.85
refreshComputedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected