Home / Function/ constructor() — astro Function Reference

constructor() — astro Function Reference

Architecture documentation for the constructor() function in errors.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  ae0cabb0_1b68_899d_0aa1_2d3f9ad75a05["constructor()"]
  aac86e2c_9a2e_66d4_f18c_2686dd3c705d["LiveCollectionCacheHintError"]
  ae0cabb0_1b68_899d_0aa1_2d3f9ad75a05 -->|defined in| aac86e2c_9a2e_66d4_f18c_2686dd3c705d
  202262d8_b252_d3ba_7b3f_5aedb620a826["formatZodError()"]
  ae0cabb0_1b68_899d_0aa1_2d3f9ad75a05 -->|calls| 202262d8_b252_d3ba_7b3f_5aedb620a826
  8e75f281_a7da_f33b_4ba7_32ecdfbaa767["constructor()"]
  ae0cabb0_1b68_899d_0aa1_2d3f9ad75a05 -->|calls| 8e75f281_a7da_f33b_4ba7_32ecdfbaa767
  style ae0cabb0_1b68_899d_0aa1_2d3f9ad75a05 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/loaders/errors.ts lines 55–65

	constructor(collection: string, entryId: string | undefined, error: z.$ZodError) {
		super(
			collection,
			[
				`**${String(collection)}${entryId ? ` → ${String(entryId)}` : ''}** returned an invalid cache hint.\n`,
				...formatZodError(error),
				'',
			].join('\n'),
		);
		this.name = 'LiveCollectionCacheHintError';
	}

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the astro codebase, defined in packages/astro/src/content/loaders/errors.ts.
Where is constructor() defined?
constructor() is defined in packages/astro/src/content/loaders/errors.ts at line 55.
What does constructor() call?
constructor() calls 2 function(s): constructor, formatZodError.

Analyze Your Own Codebase

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

Try Supermodel Free