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

Method clear

packages/svelte/src/reactivity/map.js:214–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 }
213
214 clear() {
215 if (super.size === 0) {
216 return;
217 }
218 // Clear first, so we get nice console.log outputs with $inspect
219 super.clear();
220 var sources = this.#sources;
221 set(this.#size, 0);
222 for (var s of sources.values()) {
223 set(s, -1);
224 }
225 increment(this.#version);
226 sources.clear();
227 }
228
229 #read_all() {
230 get(this.#version);

Callers 15

map.test.tsFile · 0.45
set.test.tsFile · 0.45
adjustFunction · 0.45
ComplexSelectorFunction · 0.45
pause_effectsFunction · 0.45
#processMethod · 0.45
#mergeMethod · 0.45
flushMethod · 0.45
discardMethod · 0.45
transfer_effectsMethod · 0.45
flush_queued_effectsFunction · 0.45
flush_eager_effectsFunction · 0.45

Calls 3

setFunction · 0.90
incrementFunction · 0.90
valuesMethod · 0.45

Tested by 1

testFunction · 0.36