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

Function unset_context

packages/svelte/src/internal/client/reactivity/async.js:271–281  ·  view source on GitHub ↗
(deactivate_batch = true)

Source from the content-addressed store, hash-verified

269}
270
271export function unset_context(deactivate_batch = true) {
272 set_active_effect(null);
273 set_active_reaction(null);
274 set_component_context(null);
275 if (deactivate_batch) current_batch?.deactivate();
276
277 if (DEV) {
278 set_reactivity_loss_tracker(null);
279 set_dev_stack(null);
280 }
281}
282
283/**
284 * @param {Array<() => void | Promise<void>>} thunks

Callers 5

resolveFunction · 0.90
async_derivedFunction · 0.90
finishFunction · 0.85
flattenFunction · 0.85
runFunction · 0.85

Calls 6

set_active_effectFunction · 0.90
set_active_reactionFunction · 0.90
set_component_contextFunction · 0.90
set_dev_stackFunction · 0.90
deactivateMethod · 0.80

Tested by

no test coverage detected