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
  d6dee955_2f0a_a362_98f7_02380d114a94["checkBindingType()"]
  6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"]
  d6dee955_2f0a_a362_98f7_02380d114a94 -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2
  009d7fc7_09cb_184e_e93c_1f468ff505c0["genElement()"]
  009d7fc7_09cb_184e_e93c_1f468ff505c0 -->|calls| d6dee955_2f0a_a362_98f7_02380d114a94
  style d6dee955_2f0a_a362_98f7_02380d114a94 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