resolveProvided() — vue Function Reference
Architecture documentation for the resolveProvided() function in apiInject.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 0637080d_b176_0606_01e0_53c70bfe5a84["resolveProvided()"] d99ef017_6ba9_7b75_1d27_c1117574384e["initProvide()"] d99ef017_6ba9_7b75_1d27_c1117574384e -->|calls| 0637080d_b176_0606_01e0_53c70bfe5a84 448fa2e5_feca_ab19_228e_95c68e3c6f1c["provide()"] 448fa2e5_feca_ab19_228e_95c68e3c6f1c -->|calls| 0637080d_b176_0606_01e0_53c70bfe5a84 style 0637080d_b176_0606_01e0_53c70bfe5a84 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
Called By
Source
Frequently Asked Questions
What does resolveProvided() do?
resolveProvided() is a function in the vue codebase.
What calls resolveProvided()?
resolveProvided() is called by 2 function(s): initProvide, provide.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free