Async_if_hoisting() — svelte Function Reference
Architecture documentation for the Async_if_hoisting() function in index.svelte.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 96411ed0_3cfe_fab1_bddf_6a273113a2b5["Async_if_hoisting()"] a1832261_4bac_9318_22b8_f37e7acbf0c6["index.svelte.js"] 96411ed0_3cfe_fab1_bddf_6a273113a2b5 -->|defined in| a1832261_4bac_9318_22b8_f37e7acbf0c6 style 96411ed0_3cfe_fab1_bddf_6a273113a2b5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/snapshot/samples/async-if-hoisting/_expected/client/index.svelte.js lines 5–30
export default function Async_if_hoisting($$anchor) {
var fragment = $.comment();
var node = $.first_child(fragment);
$.async(node, [], [() => Promise.resolve(true)], (node, $$condition) => {
var consequent = ($$anchor) => {
var text = $.text();
$.template_effect(($0) => $.set_text(text, $0), void 0, [() => Promise.resolve('yes yes yes')]);
$.append($$anchor, text);
};
var alternate = ($$anchor) => {
var text_1 = $.text();
$.template_effect(($0) => $.set_text(text_1, $0), void 0, [() => Promise.reject('no no no')]);
$.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_hoisting() do?
Async_if_hoisting() is a function in the svelte codebase, defined in packages/svelte/tests/snapshot/samples/async-if-hoisting/_expected/client/index.svelte.js.
Where is Async_if_hoisting() defined?
Async_if_hoisting() is defined in packages/svelte/tests/snapshot/samples/async-if-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