Home / Function/ getNormalizationType() — vue Function Reference

getNormalizationType() — vue Function Reference

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

Function typescript VueCore GlobalAPI calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  359087fb_2b37_f369_cfdb_ed6c4f7142a5["getNormalizationType()"]
  6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"]
  359087fb_2b37_f369_cfdb_ed6c4f7142a5 -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2
  c685f493_8cd2_1c26_d251_343fbd2a9498["genChildren()"]
  c685f493_8cd2_1c26_d251_343fbd2a9498 -->|calls| 359087fb_2b37_f369_cfdb_ed6c4f7142a5
  e1bb2b8a_543b_eb61_6e2f_2d772ccab9b4["needsNormalization()"]
  359087fb_2b37_f369_cfdb_ed6c4f7142a5 -->|calls| e1bb2b8a_543b_eb61_6e2f_2d772ccab9b4
  style 359087fb_2b37_f369_cfdb_ed6c4f7142a5 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, defined in src/compiler/codegen/index.ts.
Where is getNormalizationType() defined?
getNormalizationType() is defined in src/compiler/codegen/index.ts at line 551.
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