proxyWithRefUnwrap() — vue Function Reference
Architecture documentation for the proxyWithRefUnwrap() function in ref.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 0c0e51d9_10d5_5aee_bedb_8decee4220fe["proxyWithRefUnwrap()"] 0172bfc6_ac03_78a5_d338_b37f7a86af7a["initSetup()"] 0172bfc6_ac03_78a5_d338_b37f7a86af7a -->|calls| 0c0e51d9_10d5_5aee_bedb_8decee4220fe 1cce23c5_c59e_9843_86a6_04dfc6049dcd["createSetupContext()"] 1cce23c5_c59e_9843_86a6_04dfc6049dcd -->|calls| 0c0e51d9_10d5_5aee_bedb_8decee4220fe cf619ec4_7b08_dcbd_77cf_5dee8ef554bf["proxyRefs()"] cf619ec4_7b08_dcbd_77cf_5dee8ef554bf -->|calls| 0c0e51d9_10d5_5aee_bedb_8decee4220fe f00627f9_f6f9_0415_07cf_adaab8eba795["isRef()"] 0c0e51d9_10d5_5aee_bedb_8decee4220fe -->|calls| f00627f9_f6f9_0415_07cf_adaab8eba795 f4977573_27eb_c4dc_cd60_7cd1351c05f0["depend()"] 0c0e51d9_10d5_5aee_bedb_8decee4220fe -->|calls| f4977573_27eb_c4dc_cd60_7cd1351c05f0 style 0c0e51d9_10d5_5aee_bedb_8decee4220fe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/v3/reactivity/ref.ts lines 111–138
export function proxyWithRefUnwrap(
target: any,
source: Record<string, any>,
key: string
) {
Object.defineProperty(target, key, {
enumerable: true,
configurable: true,
get: () => {
const val = source[key]
if (isRef(val)) {
return val.value
} else {
const ob = val && val.__ob__
if (ob) ob.dep.depend()
return val
}
},
set: value => {
const oldValue = source[key]
if (isRef(oldValue) && !isRef(value)) {
oldValue.value = value
} else {
source[key] = value
}
}
})
}
Domain
Subdomains
Source
Frequently Asked Questions
What does proxyWithRefUnwrap() do?
proxyWithRefUnwrap() is a function in the vue codebase.
What does proxyWithRefUnwrap() call?
proxyWithRefUnwrap() calls 2 function(s): depend, isRef.
What calls proxyWithRefUnwrap()?
proxyWithRefUnwrap() is called by 3 function(s): createSetupContext, initSetup, proxyRefs.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free