getCreateSchemaResult() — astro Function Reference
Architecture documentation for the getCreateSchemaResult() function in types-generator.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 83cca5af_575c_63ed_977c_458c743a8a6a["getCreateSchemaResult()"] eca81928_a18b_c02e_8e5a_0440befa1a98["types-generator.ts"] 83cca5af_575c_63ed_977c_458c743a8a6a -->|defined in| eca81928_a18b_c02e_8e5a_0440befa1a98 b10d9005_fa71_f3ce_7f9d_49b77a03fefd["getContentLayerSchema()"] b10d9005_fa71_f3ce_7f9d_49b77a03fefd -->|calls| 83cca5af_575c_63ed_977c_458c743a8a6a 9450af48_94b5_71a2_6795_b9b190df4757["typeForCollection()"] 9450af48_94b5_71a2_6795_b9b190df4757 -->|calls| 83cca5af_575c_63ed_977c_458c743a8a6a style 83cca5af_575c_63ed_977c_458c743a8a6a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/types-generator.ts lines 367–386
async function getCreateSchemaResult<T extends keyof ContentConfig['collections']>(
collection: ContentConfig['collections'][T],
collectionKey: T,
) {
const cached = createSchemaResultCache.get(collectionKey);
if (cached) {
return cached;
}
if (
collection?.type === CONTENT_LAYER_TYPE &&
typeof collection.loader === 'object' &&
!collection.loader.schema &&
collection.loader.createSchema
) {
const result = await collection.loader.createSchema();
createSchemaResultCache.set(collectionKey, result);
return result;
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getCreateSchemaResult() do?
getCreateSchemaResult() is a function in the astro codebase, defined in packages/astro/src/content/types-generator.ts.
Where is getCreateSchemaResult() defined?
getCreateSchemaResult() is defined in packages/astro/src/content/types-generator.ts at line 367.
What calls getCreateSchemaResult()?
getCreateSchemaResult() is called by 2 function(s): getContentLayerSchema, typeForCollection.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free