MCPcopy
hub / github.com/sveltejs/svelte / pop

Function pop

packages/svelte/src/internal/client/context.js:201–226  ·  view source on GitHub ↗
(component)

Source from the content-addressed store, hash-verified

199 * @returns {T}
200 */
201export function pop(component) {
202 var context = /** @type {ComponentContext} */ (component_context);
203 var effects = context.e;
204
205 if (effects !== null) {
206 context.e = null;
207
208 for (var fn of effects) {
209 create_user_effect(fn);
210 }
211 }
212
213 if (component !== undefined) {
214 context.x = component;
215 }
216
217 context.i = true;
218
219 component_context = context.p;
220
221 if (DEV) {
222 dev_current_component_function = component_context?.function ?? null;
223 }
224
225 return component ?? /** @type {T} */ ({});
226}
227
228/** @returns {boolean} */
229export function is_runes() {

Callers 2

_mountFunction · 0.90
run_testFunction · 0.90

Calls 1

create_user_effectFunction · 0.90

Tested by

no test coverage detected