initGlobalAPI() — vue Function Reference
Architecture documentation for the initGlobalAPI() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 1aa88392_154b_6e6d_97dc_8ac29df42778["initGlobalAPI()"] 38718d0e_50b6_f32c_7ce6_c7fe083f1ba2["observe()"] 1aa88392_154b_6e6d_97dc_8ac29df42778 -->|calls| 38718d0e_50b6_f32c_7ce6_c7fe083f1ba2 4c2004eb_b2c9_532a_3bc8_e41ba108da37["initUse()"] 1aa88392_154b_6e6d_97dc_8ac29df42778 -->|calls| 4c2004eb_b2c9_532a_3bc8_e41ba108da37 1c1545a6_200b_2fc0_f1f9_06ba803aba20["initMixin()"] 1aa88392_154b_6e6d_97dc_8ac29df42778 -->|calls| 1c1545a6_200b_2fc0_f1f9_06ba803aba20 14862e78_4e1b_a138_5d8b_d69973ce321b["initExtend()"] 1aa88392_154b_6e6d_97dc_8ac29df42778 -->|calls| 14862e78_4e1b_a138_5d8b_d69973ce321b f7d4ac9d_a5a2_315f_f9da_d2eabb371af0["initAssetRegisters()"] 1aa88392_154b_6e6d_97dc_8ac29df42778 -->|calls| f7d4ac9d_a5a2_315f_f9da_d2eabb371af0 style 1aa88392_154b_6e6d_97dc_8ac29df42778 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