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
  6b1ab296_e793_3b07_72c3_40c6342b6bfe["getNormalizationType()"]
  cf9f7290_7f9d_d856_7cf0_68de752b40b7["genChildren()"]
  cf9f7290_7f9d_d856_7cf0_68de752b40b7 -->|calls| 6b1ab296_e793_3b07_72c3_40c6342b6bfe
  98e65958_cd94_af13_f5e5_530d1a389a40["needsNormalization()"]
  6b1ab296_e793_3b07_72c3_40c6342b6bfe -->|calls| 98e65958_cd94_af13_f5e5_530d1a389a40
  style 6b1ab296_e793_3b07_72c3_40c6342b6bfe 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
}

Domain

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