initProvide() — vue Function Reference
Architecture documentation for the initProvide() function in inject.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD d99ef017_6ba9_7b75_1d27_c1117574384e["initProvide()"] ad112c37_faea_8798_03f1_18e1a6303f0d["initMixin()"] ad112c37_faea_8798_03f1_18e1a6303f0d -->|calls| d99ef017_6ba9_7b75_1d27_c1117574384e 0637080d_b176_0606_01e0_53c70bfe5a84["resolveProvided()"] d99ef017_6ba9_7b75_1d27_c1117574384e -->|calls| 0637080d_b176_0606_01e0_53c70bfe5a84 style d99ef017_6ba9_7b75_1d27_c1117574384e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/instance/inject.ts lines 6–28
export function initProvide(vm: Component) {
const provideOption = vm.$options.provide
if (provideOption) {
const provided = isFunction(provideOption)
? provideOption.call(vm)
: provideOption
if (!isObject(provided)) {
return
}
const source = resolveProvided(vm)
// IE9 doesn't support Object.getOwnPropertyDescriptors so we have to
// iterate the keys ourselves.
const keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided)
for (let i = 0; i < keys.length; i++) {
const key = keys[i]
Object.defineProperty(
source,
key,
Object.getOwnPropertyDescriptor(provided, key)!
)
}
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does initProvide() do?
initProvide() is a function in the vue codebase.
What does initProvide() call?
initProvide() calls 1 function(s): resolveProvided.
What calls initProvide()?
initProvide() is called by 1 function(s): initMixin.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free