initGlobalAPI() — vue Function Reference
Architecture documentation for the initGlobalAPI() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 569ea312_4d3b_007e_7375_5022a3a78a2b["initGlobalAPI()"] 8d0e2195_5d6b_3567_6ef9_1a9c6d6caf20["observe()"] 569ea312_4d3b_007e_7375_5022a3a78a2b -->|calls| 8d0e2195_5d6b_3567_6ef9_1a9c6d6caf20 e2cdac5e_5c74_d199_56d0_63d86dfb6ee1["initUse()"] 569ea312_4d3b_007e_7375_5022a3a78a2b -->|calls| e2cdac5e_5c74_d199_56d0_63d86dfb6ee1 261a88ea_dfeb_4389_46f1_4236aac59481["initMixin()"] 569ea312_4d3b_007e_7375_5022a3a78a2b -->|calls| 261a88ea_dfeb_4389_46f1_4236aac59481 e9415a90_94de_e969_0351_990c46050d05["initExtend()"] 569ea312_4d3b_007e_7375_5022a3a78a2b -->|calls| e9415a90_94de_e969_0351_990c46050d05 e8c1002f_fb8a_40af_b6c5_3046f6a89b9d["initAssetRegisters()"] 569ea312_4d3b_007e_7375_5022a3a78a2b -->|calls| e8c1002f_fb8a_40af_b6c5_3046f6a89b9d style 569ea312_4d3b_007e_7375_5022a3a78a2b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/global-api/index.ts lines 20–68
export function initGlobalAPI(Vue: GlobalAPI) {
// config
const configDef: Record<string, any> = {}
configDef.get = () => config
if (__DEV__) {
configDef.set = () => {
warn(
'Do not replace the Vue.config object, set individual fields instead.'
)
}
}
Object.defineProperty(Vue, 'config', configDef)
// exposed util methods.
// NOTE: these are not considered part of the public API - avoid relying on
// them unless you are aware of the risk.
Vue.util = {
warn,
extend,
mergeOptions,
defineReactive
}
Vue.set = set
Vue.delete = del
Vue.nextTick = nextTick
// 2.6 explicit observable API
Vue.observable = <T>(obj: T): T => {
observe(obj)
return obj
}
Vue.options = Object.create(null)
ASSET_TYPES.forEach(type => {
Vue.options[type + 's'] = Object.create(null)
})
// this is used to identify the "base" constructor to extend all plain-object
// components with in Weex's multi-instance scenarios.
Vue.options._base = Vue
extend(Vue.options.components, builtInComponents)
initUse(Vue)
initMixin(Vue)
initExtend(Vue)
initAssetRegisters(Vue)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does initGlobalAPI() do?
initGlobalAPI() is a function in the vue codebase.
What does initGlobalAPI() call?
initGlobalAPI() calls 5 function(s): initAssetRegisters, initExtend, initMixin, initUse, observe.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free