From cd7a71f92a5ef8fcacc85887a0d98e5fa07dda29 Mon Sep 17 00:00:00 2001 From: Elliott Johnson Date: Wed, 5 Nov 2025 11:21:32 -0700 Subject: [PATCH] oops --- packages/svelte/src/internal/client/hydratable.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/svelte/src/internal/client/hydratable.js b/packages/svelte/src/internal/client/hydratable.js index 780bbed37c..b35f3269d9 100644 --- a/packages/svelte/src/internal/client/hydratable.js +++ b/packages/svelte/src/internal/client/hydratable.js @@ -19,13 +19,13 @@ export function hydratable(key, fn, options = {}) { // something to be synchronously hydratable and then have it not be return fn(); } - return parse(val, options.transport?.decode); + return decode(val, options.transport?.decode); } /** * @template T * @param {string} key - * @param {{ parse?: Decode }} [options] + * @param {{ decode?: Decode }} [options] * @returns {T | undefined} */ export function get_hydratable_value(key, options = {}) { @@ -40,7 +40,7 @@ export function get_hydratable_value(key, options = {}) { return undefined; } - return parse(val, options.parse); + return decode(val, options.decode); } /** @@ -58,9 +58,9 @@ export function has_hydratable_value(key) { /** * @template T * @param {unknown} val - * @param {Decode | undefined} parse + * @param {Decode | undefined} decode * @returns {T} */ -function parse(val, parse) { - return (parse ?? ((val) => /** @type {T} */ (val)))(val); +function decode(val, decode) { + return (decode ?? ((val) => /** @type {T} */ (val)))(val); }