Home / Function/ Async_each_hoisting() — svelte Function Reference

Async_each_hoisting() — svelte Function Reference

Architecture documentation for the Async_each_hoisting() function in index.svelte.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  24ceb718_97cb_c3f8_01d4_87b0dcbd2d31["Async_each_hoisting()"]
  4ce4b08a_8fd4_e34a_7967_fe19ad9840ca["index.svelte.js"]
  24ceb718_97cb_c3f8_01d4_87b0dcbd2d31 -->|defined in| 4ce4b08a_8fd4_e34a_7967_fe19ad9840ca
  style 24ceb718_97cb_c3f8_01d4_87b0dcbd2d31 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/server/index.svelte.js lines 4–23

export default function Async_each_hoisting($$renderer) {
	const first = Promise.resolve(1);
	const second = Promise.resolve(2);
	const third = Promise.resolve(3);

	$$renderer.push(`<!--[-->`);

	$$renderer.child_block(async ($$renderer) => {
		const each_array = $.ensure_array_like((await $.save(Promise.resolve([first, second, third])))());

		for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
			let item = each_array[$$index];

			$$renderer.push(`<!---->`);
			$$renderer.push(async () => $.escape(await item));
		}
	});

	$$renderer.push(`<!--]-->`);
}

Domain

Subdomains

Frequently Asked Questions

What does Async_each_hoisting() do?
Async_each_hoisting() is a function in the svelte codebase, defined in packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/server/index.svelte.js.
Where is Async_each_hoisting() defined?
Async_each_hoisting() is defined in packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/server/index.svelte.js at line 4.

Analyze Your Own Codebase

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

Try Supermodel Free