From df027d0f34ffd0f50b8ad362e05c1340ae6e2a12 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 11 Feb 2025 11:20:36 -0500 Subject: [PATCH] shuffle --- .../internal/client/dom/blocks/boundary.js | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/boundary.js b/packages/svelte/src/internal/client/dom/blocks/boundary.js index 2c7136ef10..57641c7a9c 100644 --- a/packages/svelte/src/internal/client/dom/blocks/boundary.js +++ b/packages/svelte/src/internal/client/dom/blocks/boundary.js @@ -45,6 +45,18 @@ import { loop } from '../../loop.js'; * }} BoundaryProps */ +var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED | BOUNDARY_EFFECT; + +/** + * @param {TemplateNode} node + * @param {BoundaryProps} props + * @param {((anchor: Node) => void)} children + * @returns {void} + */ +export function boundary(node, props, children) { + new Boundary(node, props, children); +} + export class Boundary { suspended = false; inert = false; @@ -385,24 +397,6 @@ export class Boundary { } } -var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED | BOUNDARY_EFFECT; - -/** - * @param {TemplateNode} node - * @param {{ - * onerror?: (error: unknown, reset: () => void) => void; - * failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void; - * pending?: (anchor: Node) => void; - * showPendingAfter?: number; - * showPendingFor?: number; - * }} props - * @param {((anchor: Node) => void)} children - * @returns {void} - */ -export function boundary(node, props, children) { - new Boundary(node, props, children); -} - /** * * @param {Effect} effect