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

Function next

packages/svelte/src/internal/client/reactivity/deriveds.js:267–279  ·  view source on GitHub ↗

@param {Promise } p

(p)

Source from the content-addressed store, hash-verified

265 return new Promise((fulfil) => {
266 /** @param {Promise<V>} p */
267 function next(p) {
268 function go() {
269 if (p === promise) {
270 fulfil(signal);
271 } else {
272 // if the effect re-runs before the initial promise
273 // resolves, delay resolution until we have a value
274 next(promise);
275 }
276 }
277
278 p.then(go, go);
279 }
280
281 next(promise);
282 });

Callers 2

goFunction · 0.70
async_derivedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…