incremental-batches
Rich Harris 1 week ago
parent e413dbf668
commit 6bba647073

@ -532,6 +532,16 @@ export class Batch {
// Mark is not guaranteed to not touch these, so we transfer them
this.transfer_effects(batch.#dirty_effects);
for (const fn of batch.#commit_callbacks) {
this.#commit_callbacks.add(() => fn(batch));
}
for (const fn of batch.#discard_callbacks) {
this.#discard_callbacks.add(() => fn(batch));
}
this.settled().then(batch.#deferred?.resolve, batch.#deferred?.reject);
/**
* mark all effects that depend on `batch.current`, except the
* async effects that we just resolved (TODO unless they depend

Loading…
Cancel
Save