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
  43ea9c09_3b12_2310_f331_0eb70fdc38aa["checkBindingType()"]
  ce806ab8_847b_273b_e07c_0a796c2f76ae["genElement()"]
  ce806ab8_847b_273b_e07c_0a796c2f76ae -->|calls| 43ea9c09_3b12_2310_f331_0eb70fdc38aa
  836e9c36_fe18_c1c8_9715_d916891f0517["camelize()"]
  43ea9c09_3b12_2310_f331_0eb70fdc38aa -->|calls| 836e9c36_fe18_c1c8_9715_d916891f0517
  80f517e3_ada6_0ebb_d9d7_71865191cb06["capitalize()"]
  43ea9c09_3b12_2310_f331_0eb70fdc38aa -->|calls| 80f517e3_ada6_0ebb_d9d7_71865191cb06
  style 43ea9c09_3b12_2310_f331_0eb70fdc38aa 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
  }
}

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