baseService.validateOptions() — astro Function Reference
Architecture documentation for the baseService.validateOptions() function in service.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 26530394_92cc_61b1_b120_5db453d098e6["baseService.validateOptions()"] f0f55fc4_9c63_b35c_86d8_8eb3e4fa20ee["service.ts"] 26530394_92cc_61b1_b120_5db453d098e6 -->|defined in| f0f55fc4_9c63_b35c_86d8_8eb3e4fa20ee 4cca3d1a_d2b8_5989_f8cd_75455a62f75f["verifyOptions()"] 26530394_92cc_61b1_b120_5db453d098e6 -->|calls| 4cca3d1a_d2b8_5989_f8cd_75455a62f75f style 26530394_92cc_61b1_b120_5db453d098e6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/assets/services/service.ts lines 228–250
validateOptions(options) {
// Run verification-only checks
verifyOptions(options);
// Apply defaults and normalization separate from verification
if (!options.format) {
if (isESMImportedImage(options.src) && options.src.format === 'svg') {
options.format = 'svg';
} else {
options.format = DEFAULT_OUTPUT_FORMAT;
}
}
if (options.width) options.width = Math.round(options.width);
if (options.height) options.height = Math.round(options.height);
if (options.layout && options.width && options.height) {
options.fit ??= 'cover';
delete options.layout;
}
if (options.fit === 'none') {
delete options.fit;
}
return options;
},
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does baseService.validateOptions() do?
baseService.validateOptions() is a function in the astro codebase, defined in packages/astro/src/assets/services/service.ts.
Where is baseService.validateOptions() defined?
baseService.validateOptions() is defined in packages/astro/src/assets/services/service.ts at line 228.
What does baseService.validateOptions() call?
baseService.validateOptions() calls 1 function(s): verifyOptions.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free