Home / Function/ getNormalizationType() — vue Function Reference

getNormalizationType() — vue Function Reference

Architecture documentation for the getNormalizationType() function in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  9e0c7845_d508_e175_3a0a_b1123c0b070d["getNormalizationType()"]
  a9c90cf9_5508_948e_464e_8e694711c96f["genChildren()"]
  a9c90cf9_5508_948e_464e_8e694711c96f -->|calls| 9e0c7845_d508_e175_3a0a_b1123c0b070d
  461840db_f2c1_e683_4c07_f25bbde33abf["needsNormalization()"]
  9e0c7845_d508_e175_3a0a_b1123c0b070d -->|calls| 461840db_f2c1_e683_4c07_f25bbde33abf
  style 9e0c7845_d508_e175_3a0a_b1123c0b070d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/codegen/index.ts lines 551–577

function getNormalizationType(
  children: Array<ASTNode>,
  maybeComponent: (el: ASTElement) => boolean
): number {
  let res = 0
  for (let i = 0; i < children.length; i++) {
    const el: ASTNode = children[i]
    if (el.type !== 1) {
      continue
    }
    if (
      needsNormalization(el) ||
      (el.ifConditions &&
        el.ifConditions.some(c => needsNormalization(c.block)))
    ) {
      res = 2
      break
    }
    if (
      maybeComponent(el) ||
      (el.ifConditions && el.ifConditions.some(c => maybeComponent(c.block)))
    ) {
      res = 1
    }
  }
  return res
}

Subdomains

Called By

Frequently Asked Questions

What does getNormalizationType() do?
getNormalizationType() is a function in the vue codebase.
What does getNormalizationType() call?
getNormalizationType() calls 1 function(s): needsNormalization.
What calls getNormalizationType()?
getNormalizationType() is called by 1 function(s): genChildren.

Analyze Your Own Codebase

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

Try Supermodel Free