diff --git a/packages/svelte/src/internal/client/dev/inspect.js b/packages/svelte/src/internal/client/dev/inspect.js index b907f396dc..89e7e939ec 100644 --- a/packages/svelte/src/internal/client/dev/inspect.js +++ b/packages/svelte/src/internal/client/dev/inspect.js @@ -13,8 +13,7 @@ export function inspect(get_value, inspector = console.log) { let initial = true; inspect_effect(() => { - const value = deep_snapshot(get_value()); - inspector(initial ? 'init' : 'update', ...value); + inspector(initial ? 'init' : 'update', ...deep_snapshot(get_value())); initial = false; }); } diff --git a/packages/svelte/src/internal/client/reactivity/sources.js b/packages/svelte/src/internal/client/reactivity/sources.js index da713bcc01..904d99332e 100644 --- a/packages/svelte/src/internal/client/reactivity/sources.js +++ b/packages/svelte/src/internal/client/reactivity/sources.js @@ -23,21 +23,18 @@ import * as e from '../errors.js'; /** * @template V - * @param {V} value + * @param {V} v * @returns {import('#client').Source} */ /*#__NO_SIDE_EFFECTS__*/ -export function source(value) { - /** @type {import('#client').Source} */ - const source = { +export function source(v) { + return { f: 0, // TODO ideally we could skip this altogether, but it causes type errors + v, reactions: null, - equals: equals, - v: value, + equals, version: 0 }; - - return source; } /** diff --git a/packages/svelte/src/internal/client/reactivity/types.d.ts b/packages/svelte/src/internal/client/reactivity/types.d.ts index e1d420c570..4d77a68a13 100644 --- a/packages/svelte/src/internal/client/reactivity/types.d.ts +++ b/packages/svelte/src/internal/client/reactivity/types.d.ts @@ -53,12 +53,6 @@ export interface Effect extends Reaction { component_function?: any; } -export interface ValueDebug extends Value { - inspect: Set; -} - -export interface DerivedDebug extends Derived, ValueDebug {} - export type Source = Value; export type MaybeSource = T | Source; diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index 126caaf90f..cbe2b15739 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -104,14 +104,6 @@ export function set_current_untracked_writes(value) { current_untracked_writes = value; } -/** @type {null | import('#client').ValueDebug} */ -export let last_inspected_signal = null; - -/** @param {null | import('#client').ValueDebug} signal */ -export function set_last_inspected_signal(signal) { - last_inspected_signal = signal; -} - /** @type {number} Used by sources and deriveds for handling updates to unowned deriveds */ let current_version = 0;