resolveProvided() — vue Function Reference
Architecture documentation for the resolveProvided() function in apiInject.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 6d02ba8b_00f1_96e7_030f_48516ba393f8["resolveProvided()"] 83b69f04_ff47_67cf_7f1c_542b323e1eb5["apiInject.ts"] 6d02ba8b_00f1_96e7_030f_48516ba393f8 -->|defined in| 83b69f04_ff47_67cf_7f1c_542b323e1eb5 edf6e84a_a9b3_f218_50da_70c66a6fd2b4["provide()"] edf6e84a_a9b3_f218_50da_70c66a6fd2b4 -->|calls| 6d02ba8b_00f1_96e7_030f_48516ba393f8 style 6d02ba8b_00f1_96e7_030f_48516ba393f8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/v3/apiInject.ts lines 18–31
export function resolveProvided(vm: Component): Record<string, any> {
// by default an instance inherits its parent's provides object
// but when it needs to provide values of its own, it creates its
// own provides object using parent provides object as prototype.
// this way in `inject` we can simply look up injections from direct
// parent and let the prototype chain do the work.
const existing = vm._provided
const parentProvides = vm.$parent && vm.$parent._provided
if (parentProvides === existing) {
return (vm._provided = Object.create(parentProvides))
} else {
return existing
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does resolveProvided() do?
resolveProvided() is a function in the vue codebase, defined in src/v3/apiInject.ts.
Where is resolveProvided() defined?
resolveProvided() is defined in src/v3/apiInject.ts at line 18.
What calls resolveProvided()?
resolveProvided() is called by 1 function(s): provide.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free