Home / Type/ LiveLoader Type — astro Architecture

LiveLoader Type — astro Architecture

Architecture documentation for the LiveLoader type/interface in types.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  58fa9f99_4e75_fc0f_af2f_72a4078a7495["LiveLoader"]
  a146b99b_6ede_06f0_3c83_b19531b5f76a["types.ts"]
  58fa9f99_4e75_fc0f_af2f_72a4078a7495 -->|defined in| a146b99b_6ede_06f0_3c83_b19531b5f76a
  style 58fa9f99_4e75_fc0f_af2f_72a4078a7495 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/loaders/types.ts lines 86–102

export interface LiveLoader<
	TData extends Record<string, any> = Record<string, unknown>,
	TEntryFilter extends Record<string, any> | never = never,
	TCollectionFilter extends Record<string, any> | never = never,
	TError extends Error = Error,
> {
	/** Unique name of the loader, e.g. the npm package name */
	name: string;
	/** Load a single entry */
	loadEntry: (
		context: LoadEntryContext<TEntryFilter>,
	) => Promise<LiveDataEntry<TData> | undefined | { error: TError }>;
	/** Load a collection of entries */
	loadCollection: (
		context: LoadCollectionContext<TCollectionFilter>,
	) => Promise<LiveDataCollection<TData> | { error: TError }>;
}

Frequently Asked Questions

What is the LiveLoader type?
LiveLoader is a type/interface in the astro codebase, defined in packages/astro/src/content/loaders/types.ts.
Where is LiveLoader defined?
LiveLoader is defined in packages/astro/src/content/loaders/types.ts at line 86.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free