Home / Function/ renderArray() — astro Function Reference

renderArray() — astro Function Reference

Architecture documentation for the renderArray() function in any.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  2e6b3a48_deda_e439_87c1_f350f615f871["renderArray()"]
  0e818d99_0299_a58a_f7c7_b3fe5a5b3548["any.ts"]
  2e6b3a48_deda_e439_87c1_f350f615f871 -->|defined in| 0e818d99_0299_a58a_f7c7_b3fe5a5b3548
  033d3df7_8875_dc4e_f964_c42d13fcdeef["renderChild()"]
  033d3df7_8875_dc4e_f964_c42d13fcdeef -->|calls| 2e6b3a48_deda_e439_87c1_f350f615f871
  033d3df7_8875_dc4e_f964_c42d13fcdeef["renderChild()"]
  2e6b3a48_deda_e439_87c1_f350f615f871 -->|calls| 033d3df7_8875_dc4e_f964_c42d13fcdeef
  style 2e6b3a48_deda_e439_87c1_f350f615f871 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/render/any.ts lines 72–99

function renderArray(destination: RenderDestination, children: any[]): void | Promise<void> {
	// Render all children eagerly and in parallel
	const flushers = children.map((c) => {
		return createBufferedRenderer(destination, (bufferDestination) => {
			return renderChild(bufferDestination, c);
		});
	});

	const iterator = flushers[Symbol.iterator]();

	const iterate = (): void | Promise<void> => {
		for (;;) {
			const { value: flusher, done } = iterator.next();

			if (done) {
				break;
			}

			const result = flusher.flush();

			if (isPromise(result)) {
				return result.then(iterate);
			}
		}
	};

	return iterate();
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does renderArray() do?
renderArray() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/any.ts.
Where is renderArray() defined?
renderArray() is defined in packages/astro/src/runtime/server/render/any.ts at line 72.
What does renderArray() call?
renderArray() calls 1 function(s): renderChild.
What calls renderArray()?
renderArray() is called by 1 function(s): renderChild.

Analyze Your Own Codebase

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

Try Supermodel Free