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

Method ensure

packages/svelte/src/internal/client/reactivity/batch.js:852–866  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

850 }
851
852 static ensure() {
853 if (current_batch === null) {
854 const batch = (current_batch = new Batch());
855
856 if (!is_processing && !is_flushing_sync) {
857 queue_micro_task(() => {
858 if (!batch.#started) {
859 batch.flush();
860 }
861 });
862 }
863 }
864
865 return current_batch;
866 }
867
868 apply() {
869 if (!async_mode_flag || (!this.is_fork && this.#prev === null && this.#next === null)) {

Callers 8

settledFunction · 0.45
create_effectFunction · 0.45
effect_rootFunction · 0.45
component_rootFunction · 0.45
resume_childrenFunction · 0.45
#processMethod · 0.45
forkFunction · 0.45
internal_setFunction · 0.45

Calls 2

queue_micro_taskFunction · 0.90
flushMethod · 0.80

Tested by

no test coverage detected