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

Method constructor

packages/svelte/src/reactivity/reactive-value.js:15–18  ·  view source on GitHub ↗

* * @param {() => T} fn * @param {(update: () => void) => void} onsubscribe

(fn, onsubscribe)

Source from the content-addressed store, hash-verified

13 * @param {(update: () => void) => void} onsubscribe
14 */
15 constructor(fn, onsubscribe) {
16 this.#fn = fn;
17 this.#subscribe = createSubscriber(onsubscribe);
18 }
19
20 get current() {
21 this.#subscribe();

Callers

nothing calls this directly

Calls 1

createSubscriberFunction · 0.90

Tested by

no test coverage detected