Home / Function/ mustUseProp() — vue Function Reference

mustUseProp() — vue Function Reference

Architecture documentation for the mustUseProp() function in attrs.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  1222327b_66ae_08ee_159e_01f1c3c8b2ad["mustUseProp()"]
  253040ac_51e9_934f_58b0_0a0da182f99d["attrs.ts"]
  1222327b_66ae_08ee_159e_01f1c3c8b2ad -->|defined in| 253040ac_51e9_934f_58b0_0a0da182f99d
  style 1222327b_66ae_08ee_159e_01f1c3c8b2ad fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/platforms/web/util/attrs.ts lines 9–20

export const mustUseProp = (
  tag: string,
  type?: string | null,
  attr?: string
): boolean => {
  return (
    (attr === 'value' && acceptValue(tag) && type !== 'button') ||
    (attr === 'selected' && tag === 'option') ||
    (attr === 'checked' && tag === 'input') ||
    (attr === 'muted' && tag === 'video')
  )
}

Domain

Subdomains

Frequently Asked Questions

What does mustUseProp() do?
mustUseProp() is a function in the vue codebase, defined in src/platforms/web/util/attrs.ts.
Where is mustUseProp() defined?
mustUseProp() is defined in src/platforms/web/util/attrs.ts at line 9.

Analyze Your Own Codebase

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

Try Supermodel Free