Home / Function/ isInDestructureAssignment() — vue Function Reference

isInDestructureAssignment() — vue Function Reference

Architecture documentation for the isInDestructureAssignment() function in babelUtils.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  22d4870d_f7a6_ae66_a23b_c5385723a602["isInDestructureAssignment()"]
  3b969150_5597_0548_8251_6f12c0644b67["isReferencedIdentifier()"]
  3b969150_5597_0548_8251_6f12c0644b67 -->|calls| 22d4870d_f7a6_ae66_a23b_c5385723a602
  style 22d4870d_f7a6_ae66_a23b_c5385723a602 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/babelUtils.ts lines 119–138

export function isInDestructureAssignment(
  parent: Node,
  parentStack: Node[]
): boolean {
  if (
    parent &&
    (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')
  ) {
    let i = parentStack.length
    while (i--) {
      const p = parentStack[i]
      if (p.type === 'AssignmentExpression') {
        return true
      } else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) {
        break
      }
    }
  }
  return false
}

Domain

Subdomains

Frequently Asked Questions

What does isInDestructureAssignment() do?
isInDestructureAssignment() is a function in the vue codebase.
What calls isInDestructureAssignment()?
isInDestructureAssignment() is called by 1 function(s): isReferencedIdentifier.

Analyze Your Own Codebase

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

Try Supermodel Free