DataStore Type — astro Architecture
Architecture documentation for the DataStore type/interface in mutable-data-store.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 4de4a613_edba_5365_db13_103b48ea9c1d["DataStore"] fc8b2048_232d_51e7_d71d_a83969632b6f["mutable-data-store.ts"] 4de4a613_edba_5365_db13_103b48ea9c1d -->|defined in| fc8b2048_232d_51e7_d71d_a83969632b6f style 4de4a613_edba_5365_db13_103b48ea9c1d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/mutable-data-store.ts lines 449–476
export interface DataStore {
get: <TData extends Record<string, unknown> = Record<string, unknown>>(
key: string,
) => DataEntry<TData> | undefined;
entries: () => Array<[id: string, DataEntry]>;
set: <TData extends Record<string, unknown>>(opts: DataEntry<TData>) => boolean;
values: () => Array<DataEntry>;
keys: () => Array<string>;
delete: (key: string) => void;
clear: () => void;
has: (key: string) => boolean;
/**
* @internal Adds asset imports to the store. This is used to track image imports for the build. This API is subject to change.
*/
addAssetImports: (assets: Array<string>, fileName: string) => void;
/**
* @internal Adds an asset import to the store. This is used to track image imports for the build. This API is subject to change.
*/
addAssetImport: (assetImport: string, fileName: string) => void;
/**
* Adds a single asset to the store. This asset will be transformed
* by Vite, and the URL will be available in the final build.
* @param fileName
* @param specifier
* @returns
*/
addModuleImport: (fileName: string) => void;
}
Source
Frequently Asked Questions
What is the DataStore type?
DataStore is a type/interface in the astro codebase, defined in packages/astro/src/content/mutable-data-store.ts.
Where is DataStore defined?
DataStore is defined in packages/astro/src/content/mutable-data-store.ts at line 449.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free