Async_if_alternate_hoisting() — svelte Function Reference
Architecture documentation for the Async_if_alternate_hoisting() function in index.svelte.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD ead6850a_957d_e179_9526_1159f38af88b["Async_if_alternate_hoisting()"] 0b8add82_b72b_5a38_fd7b_d9269c6a8ea5["index.svelte.js"] ead6850a_957d_e179_9526_1159f38af88b -->|defined in| 0b8add82_b72b_5a38_fd7b_d9269c6a8ea5 style ead6850a_957d_e179_9526_1159f38af88b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js lines 5–30
export default function Async_if_alternate_hoisting($$anchor) {
var fragment = $.comment();
var node = $.first_child(fragment);
$.async(node, [], [() => Promise.resolve(false)], (node, $$condition) => {
var consequent = ($$anchor) => {
var text = $.text();
$.template_effect(($0) => $.set_text(text, $0), void 0, [() => Promise.reject('no no no')]);
$.append($$anchor, text);
};
var alternate = ($$anchor) => {
var text_1 = $.text();
$.template_effect(($0) => $.set_text(text_1, $0), void 0, [() => Promise.resolve('yes yes yes')]);
$.append($$anchor, text_1);
};
$.if(node, ($$render) => {
if ($.get($$condition)) $$render(consequent); else $$render(alternate, false);
});
});
$.append($$anchor, fragment);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Async_if_alternate_hoisting() do?
Async_if_alternate_hoisting() is a function in the svelte codebase, defined in packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js.
Where is Async_if_alternate_hoisting() defined?
Async_if_alternate_hoisting() is defined in packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free