From 6169405638afa0c4734f0c048938162b7f89fb02 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 7 Jul 2025 20:05:11 -0400 Subject: [PATCH] more JSDoc --- .../src/internal/client/reactivity/batch.js | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/svelte/src/internal/client/reactivity/batch.js b/packages/svelte/src/internal/client/reactivity/batch.js index 9db6c6a276..c05b1c0d2b 100644 --- a/packages/svelte/src/internal/client/reactivity/batch.js +++ b/packages/svelte/src/internal/client/reactivity/batch.js @@ -85,16 +85,32 @@ export class Batch { */ #deferred = null; - /** @type {Effect[]} */ + /** + * Async effects (created inside `async_derived`) encountered during processing. + * These run after the rest of the batch has updated, since they should + * always have the latest values + * @type {Effect[]} + */ #async_effects = []; - /** @type {Effect[]} */ + /** + * The same as `#async_effects`, but for effects inside a newly-created + * `` — these do not prevent the batch from committing + * @type {Effect[]} + */ #boundary_async_effects = []; - /** @type {Effect[]} */ + /** + * Template effects and `$effect.pre` effects, which run when + * a batch is committed + * @type {Effect[]} + */ #render_effects = []; - /** @type {Effect[]} */ + /** + * The same as `#render_effects`, but for `$effect` (which runs after) + * @type {Effect[]} + */ #effects = []; /**