defineReadonlyProperty() — vue Function Reference
Architecture documentation for the defineReadonlyProperty() function in readonly.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 7d2efa66_861c_4ad0_54da_425de619e09d["defineReadonlyProperty()"] 0c0a6db0_d081_921f_5fe2_f51407664b15["readonly.ts"] 7d2efa66_861c_4ad0_54da_425de619e09d -->|defined in| 0c0a6db0_d081_921f_5fe2_f51407664b15 570658a0_90e9_3496_213a_7280821a5a99["createReadonly()"] 570658a0_90e9_3496_213a_7280821a5a99 -->|calls| 7d2efa66_861c_4ad0_54da_425de619e09d 6805952a_0946_d29b_2a2d_94905f439fe7["readonly()"] 7d2efa66_861c_4ad0_54da_425de619e09d -->|calls| 6805952a_0946_d29b_2a2d_94905f439fe7 style 7d2efa66_861c_4ad0_54da_425de619e09d 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
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does defineReadonlyProperty() do?
defineReadonlyProperty() is a function in the vue codebase, defined in src/v3/reactivity/readonly.ts.
Where is defineReadonlyProperty() defined?
defineReadonlyProperty() is defined in src/v3/reactivity/readonly.ts at line 99.
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