initAssetRegisters() — vue Function Reference
Architecture documentation for the initAssetRegisters() function in assets.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 4c59a107_b6e6_9de7_cbeb_c76f0d664854["initAssetRegisters()"] cbff02ff_d07c_20c5_3983_6117ca41c317["assets.ts"] 4c59a107_b6e6_9de7_cbeb_c76f0d664854 -->|defined in| cbff02ff_d07c_20c5_3983_6117ca41c317 ee699f75_f5be_8f7a_91c2_18232c62b421["initGlobalAPI()"] ee699f75_f5be_8f7a_91c2_18232c62b421 -->|calls| 4c59a107_b6e6_9de7_cbeb_c76f0d664854 style 4c59a107_b6e6_9de7_cbeb_c76f0d664854 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/global-api/assets.ts lines 5–35
export function initAssetRegisters(Vue: GlobalAPI) {
/**
* Create asset registration methods.
*/
ASSET_TYPES.forEach(type => {
// @ts-expect-error function is not exact same type
Vue[type] = function (
id: string,
definition?: Function | Object
): Function | Object | void {
if (!definition) {
return this.options[type + 's'][id]
} else {
/* istanbul ignore if */
if (__DEV__ && type === 'component') {
validateComponentName(id)
}
if (type === 'component' && isPlainObject(definition)) {
// @ts-expect-error
definition.name = definition.name || id
definition = this.options._base.extend(definition)
}
if (type === 'directive' && isFunction(definition)) {
definition = { bind: definition, update: definition }
}
this.options[type + 's'][id] = definition
return definition
}
}
})
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does initAssetRegisters() do?
initAssetRegisters() is a function in the vue codebase, defined in src/core/global-api/assets.ts.
Where is initAssetRegisters() defined?
initAssetRegisters() is defined in src/core/global-api/assets.ts at line 5.
What calls initAssetRegisters()?
initAssetRegisters() is called by 1 function(s): initGlobalAPI.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free