MCPcopy
hub / github.com/livebud/bud / AwaitBlock$1

Function AwaitBlock$1

package/svelte/compiler.js:22662–22678  ·  view source on GitHub ↗
(node2, renderer, options)

Source from the content-addressed store, hash-verified

22660 };
22661 }
22662 function AwaitBlock$1(node2, renderer, options) {
22663 renderer.push();
22664 renderer.render(node2.pending.children, options);
22665 const pending = renderer.pop();
22666 renderer.push();
22667 renderer.render(node2.then.children, options);
22668 const then = renderer.pop();
22669 renderer.add_expression(x`
22670 function(__value) {
22671 if (@is_promise(__value)) {
22672 __value.then(null, @noop);
22673 return ${pending};
22674 }
22675 return (function(${node2.then_node ? node2.then_node : ""}) { ${get_const_tags$1(node2.then.const_tags)}; return ${then}; }(__value));
22676 }(${node2.expression.node})
22677 `);
22678 }
22679 function Comment$2(node2, renderer, options) {
22680 if (options.preserveComments) {
22681 renderer.add_string(`<!--${node2.data}-->`);

Callers

nothing calls this directly

Calls 6

xFunction · 0.85
get_const_tags$1Function · 0.85
pushMethod · 0.80
popMethod · 0.80
add_expressionMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected