resolveAsset() — vue Function Reference
Architecture documentation for the resolveAsset() function in options.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD d2000583_1605_8c59_7155_3a8768706faf["resolveAsset()"] 5c734a8f_efba_819c_28fc_f56bfd6b701f["options.ts"] d2000583_1605_8c59_7155_3a8768706faf -->|defined in| 5c734a8f_efba_819c_28fc_f56bfd6b701f e8b22500_20a5_2e19_4c79_386004841499["warn()"] d2000583_1605_8c59_7155_3a8768706faf -->|calls| e8b22500_20a5_2e19_4c79_386004841499 style d2000583_1605_8c59_7155_3a8768706faf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/util/options.ts lines 466–489
export function resolveAsset(
options: Record<string, any>,
type: string,
id: string,
warnMissing?: boolean
): any {
/* istanbul ignore if */
if (typeof id !== 'string') {
return
}
const assets = options[type]
// check local registration variations first
if (hasOwn(assets, id)) return assets[id]
const camelizedId = camelize(id)
if (hasOwn(assets, camelizedId)) return assets[camelizedId]
const PascalCaseId = capitalize(camelizedId)
if (hasOwn(assets, PascalCaseId)) return assets[PascalCaseId]
// fallback to prototype chain
const res = assets[id] || assets[camelizedId] || assets[PascalCaseId]
if (__DEV__ && warnMissing && !res) {
warn('Failed to resolve ' + type.slice(0, -1) + ': ' + id)
}
return res
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does resolveAsset() do?
resolveAsset() is a function in the vue codebase, defined in src/core/util/options.ts.
Where is resolveAsset() defined?
resolveAsset() is defined in src/core/util/options.ts at line 466.
What does resolveAsset() call?
resolveAsset() calls 1 function(s): warn.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free