Home / Function/ addDep() — vue Function Reference

addDep() — vue Function Reference

Architecture documentation for the addDep() function in watcher.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  70bd5aef_e61f_468a_cb62_8d7947947ee9["addDep()"]
  6447431e_6924_8ca8_071d_44b55ba081b1["Watcher"]
  70bd5aef_e61f_468a_cb62_8d7947947ee9 -->|defined in| 6447431e_6924_8ca8_071d_44b55ba081b1
  61024290_1455_7ebc_3d92_6fd32b0f8fa5["addSub()"]
  70bd5aef_e61f_468a_cb62_8d7947947ee9 -->|calls| 61024290_1455_7ebc_3d92_6fd32b0f8fa5
  style 70bd5aef_e61f_468a_cb62_8d7947947ee9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/watcher.ts lines 160–169

  addDep(dep: Dep) {
    const id = dep.id
    if (!this.newDepIds.has(id)) {
      this.newDepIds.add(id)
      this.newDeps.push(dep)
      if (!this.depIds.has(id)) {
        dep.addSub(this)
      }
    }
  }

Domain

Subdomains

Calls

Frequently Asked Questions

What does addDep() do?
addDep() is a function in the vue codebase, defined in src/core/observer/watcher.ts.
Where is addDep() defined?
addDep() is defined in src/core/observer/watcher.ts at line 160.
What does addDep() call?
addDep() calls 1 function(s): addSub.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free