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

Method flush

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

Source from the content-addressed store, hash-verified

601 }
602
603 flush() {
604 try {
605 if (DEV) {
606 source_stacks.clear();
607 }
608
609 is_processing = true;
610 current_batch = this;
611
612 this.#process();
613 } finally {
614 flush_count = 0;
615 last_scheduled_effect = null;
616 collected_effects = null;
617 legacy_updates = null;
618 is_processing = false;
619
620 current_batch = null;
621 batch_values = null;
622
623 old_values.clear();
624
625 if (DEV) {
626 for (const source of source_stacks) {
627 source.updated = null;
628 }
629 }
630 }
631 }
632
633 discard() {
634 for (const fn of this.#discard_callbacks) fn(this);

Callers 15

decrementMethod · 0.95
ensureMethod · 0.80
flushSyncFunction · 0.80
forkFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80

Calls 2

#processMethod · 0.95
clearMethod · 0.45

Tested by

no test coverage detected