Home / Function/ getTypeIndex() — vue Function Reference

getTypeIndex() — vue Function Reference

Architecture documentation for the getTypeIndex() function in props.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  4b5ff4c4_4a84_fe92_52cb_28a8c9c68200["getTypeIndex()"]
  50f52114_04b8_bc98_a41e_bc26a88ea2ab["validateProp()"]
  50f52114_04b8_bc98_a41e_bc26a88ea2ab -->|calls| 4b5ff4c4_4a84_fe92_52cb_28a8c9c68200
  b53bcc34_d01b_180c_e91c_f0a146c847f9["isSameType()"]
  4b5ff4c4_4a84_fe92_52cb_28a8c9c68200 -->|calls| b53bcc34_d01b_180c_e91c_f0a146c847f9
  style 4b5ff4c4_4a84_fe92_52cb_28a8c9c68200 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/util/props.ts lines 202–212

function getTypeIndex(type, expectedTypes): number {
  if (!isArray(expectedTypes)) {
    return isSameType(expectedTypes, type) ? 0 : -1
  }
  for (let i = 0, len = expectedTypes.length; i < len; i++) {
    if (isSameType(expectedTypes[i], type)) {
      return i
    }
  }
  return -1
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does getTypeIndex() do?
getTypeIndex() is a function in the vue codebase.
What does getTypeIndex() call?
getTypeIndex() calls 1 function(s): isSameType.
What calls getTypeIndex()?
getTypeIndex() is called by 1 function(s): validateProp.

Analyze Your Own Codebase

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

Try Supermodel Free