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
  fa908449_beaf_ea64_6be3_1e538eaea358["checkBindingType()"]
  4cfaef88_0bc8_30fc_0a01_09b4149fd58c["genElement()"]
  4cfaef88_0bc8_30fc_0a01_09b4149fd58c -->|calls| fa908449_beaf_ea64_6be3_1e538eaea358
  447f7b2d_d677_800e_b42e_db97e7d830a7["camelize()"]
  fa908449_beaf_ea64_6be3_1e538eaea358 -->|calls| 447f7b2d_d677_800e_b42e_db97e7d830a7
  4cc66a79_034b_1114_66f2_674d202356f6["capitalize()"]
  fa908449_beaf_ea64_6be3_1e538eaea358 -->|calls| 4cc66a79_034b_1114_66f2_674d202356f6
  style fa908449_beaf_ea64_6be3_1e538eaea358 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.
What does checkBindingType() call?
checkBindingType() calls 2 function(s): camelize, capitalize.
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