defineReadonlyProperty() — vue Function Reference
Architecture documentation for the defineReadonlyProperty() function in readonly.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 03ff7d5f_6de5_c7b0_6a9f_80d0602b34a1["defineReadonlyProperty()"] ccd19137_b11e_4069_105d_a9c9c66236df["createReadonly()"] ccd19137_b11e_4069_105d_a9c9c66236df -->|calls| 03ff7d5f_6de5_c7b0_6a9f_80d0602b34a1 34b8a3ca_39bf_16b0_04a2_fe04ca2a4860["readonly()"] 03ff7d5f_6de5_c7b0_6a9f_80d0602b34a1 -->|calls| 34b8a3ca_39bf_16b0_04a2_fe04ca2a4860 style 03ff7d5f_6de5_c7b0_6a9f_80d0602b34a1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/v3/reactivity/readonly.ts lines 99–117
function defineReadonlyProperty(
proxy: any,
target: any,
key: string,
shallow: boolean
) {
Object.defineProperty(proxy, key, {
enumerable: true,
configurable: true,
get() {
const val = target[key]
return shallow || !isPlainObject(val) ? val : readonly(val)
},
set() {
__DEV__ &&
warn(`Set operation on key "${key}" failed: target is readonly.`)
}
})
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does defineReadonlyProperty() do?
defineReadonlyProperty() is a function in the vue codebase.
What does defineReadonlyProperty() call?
defineReadonlyProperty() calls 1 function(s): readonly.
What calls defineReadonlyProperty()?
defineReadonlyProperty() is called by 1 function(s): createReadonly.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free