Home / Function/ checkNode() — vue Function Reference

checkNode() — vue Function Reference

Architecture documentation for the checkNode() function in error-detector.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  aaee210a_1630_b83a_6361_806f69707ec9["checkNode()"]
  b8d0ad80_7068_9cdf_d436_0495b6140d72["detectErrors()"]
  b8d0ad80_7068_9cdf_d436_0495b6140d72 -->|calls| aaee210a_1630_b83a_6361_806f69707ec9
  da6ee129_b19b_d0f1_26f1_e03a0847421e["checkFor()"]
  aaee210a_1630_b83a_6361_806f69707ec9 -->|calls| da6ee129_b19b_d0f1_26f1_e03a0847421e
  7fb9578a_9512_bb4d_0cf3_8122729e70cb["checkFunctionParameterExpression()"]
  aaee210a_1630_b83a_6361_806f69707ec9 -->|calls| 7fb9578a_9512_bb4d_0cf3_8122729e70cb
  963ab69f_336b_5da9_d203_6d251ae6120e["checkEvent()"]
  aaee210a_1630_b83a_6361_806f69707ec9 -->|calls| 963ab69f_336b_5da9_d203_6d251ae6120e
  b55383fd_0a74_e361_5034_d76e06d6bf2d["checkExpression()"]
  aaee210a_1630_b83a_6361_806f69707ec9 -->|calls| b55383fd_0a74_e361_5034_d76e06d6bf2d
  style aaee210a_1630_b83a_6361_806f69707ec9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/error-detector.ts lines 38–70

function checkNode(node: ASTNode, warn: Function) {
  if (node.type === 1) {
    for (const name in node.attrsMap) {
      if (dirRE.test(name)) {
        const value = node.attrsMap[name]
        if (value) {
          const range = node.rawAttrsMap[name]
          if (name === 'v-for') {
            checkFor(node, `v-for="${value}"`, warn, range)
          } else if (name === 'v-slot' || name[0] === '#') {
            checkFunctionParameterExpression(
              value,
              `${name}="${value}"`,
              warn,
              range
            )
          } else if (onRE.test(name)) {
            checkEvent(value, `${name}="${value}"`, warn, range)
          } else {
            checkExpression(value, `${name}="${value}"`, warn, range)
          }
        }
      }
    }
    if (node.children) {
      for (let i = 0; i < node.children.length; i++) {
        checkNode(node.children[i], warn)
      }
    }
  } else if (node.type === 2) {
    checkExpression(node.expression, node.text, warn, node)
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does checkNode() do?
checkNode() is a function in the vue codebase.
What does checkNode() call?
checkNode() calls 4 function(s): checkEvent, checkExpression, checkFor, checkFunctionParameterExpression.
What calls checkNode()?
checkNode() is called by 1 function(s): detectErrors.

Analyze Your Own Codebase

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

Try Supermodel Free