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

Function update

packages/svelte/src/internal/client/reactivity/sources.js:299–307  ·  view source on GitHub ↗
(source, d = 1)

Source from the content-addressed store, hash-verified

297 * @returns {T}
298 */
299export function update(source, d = 1) {
300 var value = get(source);
301 var result = d === 1 ? value++ : value--;
302
303 set(source, value);
304
305 // @ts-expect-error
306 return result;
307}
308
309/**
310 * @template {number | bigint} T

Callers 4

setFunction · 0.90
deletePropertyFunction · 0.90
eager_flushFunction · 0.90
test.tsFile · 0.90

Calls 2

getFunction · 0.90
setFunction · 0.70

Tested by

no test coverage detected