Home / Function/ constructor() — astro Function Reference

constructor() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  e2220f21_de7a_f828_41be_c7f9ef260d21["constructor()"]
  48bba3f8_c792_f2aa_c497_4f494ca2f1da["BufferedRenderer"]
  e2220f21_de7a_f828_41be_c7f9ef260d21 -->|defined in| 48bba3f8_c792_f2aa_c497_4f494ca2f1da
  style e2220f21_de7a_f828_41be_c7f9ef260d21 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/render/util.ts lines 202–211

	public constructor(destination: RenderDestination, renderFunction: RenderFunction) {
		this.destination = destination;
		this.renderPromise = renderFunction(this);

		if (isPromise(this.renderPromise)) {
			// Catch here in case it throws before `flush` is called,
			// to prevent an unhandled rejection.
			Promise.resolve(this.renderPromise).catch(noop);
		}
	}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/util.ts.
Where is constructor() defined?
constructor() is defined in packages/astro/src/runtime/server/render/util.ts at line 202.

Analyze Your Own Codebase

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

Try Supermodel Free