Home / Function/ checkBindingType() — vue Function Reference

checkBindingType() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  bded0e6c_82d0_13e8_6213_80ce42c23f51["checkBindingType()"]
  54260741_ae9d_a025_86de_47c513f5f82d["index.ts"]
  bded0e6c_82d0_13e8_6213_80ce42c23f51 -->|defined in| 54260741_ae9d_a025_86de_47c513f5f82d
  075d1f95_9965_89f4_3c01_f944fee6b553["genElement()"]
  075d1f95_9965_89f4_3c01_f944fee6b553 -->|calls| bded0e6c_82d0_13e8_6213_80ce42c23f51
  style bded0e6c_82d0_13e8_6213_80ce42c23f51 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/codegen/index.ts lines 126–154

function checkBindingType(bindings: BindingMetadata, key: string) {
  const camelName = camelize(key)
  const PascalName = capitalize(camelName)
  const checkType = (type) => {
    if (bindings[key] === type) {
      return key
    }
    if (bindings[camelName] === type) {
      return camelName
    }
    if (bindings[PascalName] === type) {
      return PascalName
    }
  }
  const fromConst =
    checkType(BindingTypes.SETUP_CONST) ||
    checkType(BindingTypes.SETUP_REACTIVE_CONST)
  if (fromConst) {
    return fromConst
  }

  const fromMaybeRef =
    checkType(BindingTypes.SETUP_LET) ||
    checkType(BindingTypes.SETUP_REF) ||
    checkType(BindingTypes.SETUP_MAYBE_REF)
  if (fromMaybeRef) {
    return fromMaybeRef
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does checkBindingType() do?
checkBindingType() is a function in the vue codebase, defined in src/compiler/codegen/index.ts.
Where is checkBindingType() defined?
checkBindingType() is defined in src/compiler/codegen/index.ts at line 126.
What calls checkBindingType()?
checkBindingType() is called by 1 function(s): genElement.

Analyze Your Own Codebase

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

Try Supermodel Free