diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index 905cfb8d86..1f88eb00b8 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -152,7 +152,7 @@ export function batch_inspect(target, prop, receiver) { /** * @template V - * @param {import('#client').Signal} signal + * @param {import('#client').ValueSignal} signal * @returns {boolean} */ function is_signal_dirty(signal) { @@ -216,7 +216,7 @@ function execute_signal_fn(signal) { const previous_skip_consumer = current_skip_consumer; const is_render_effect = (flags & RENDER_EFFECT) !== 0; const previous_untracking = current_untracking; - current_dependencies = /** @type {null | import('#client').Signal[]} */ (null); + current_dependencies = /** @type {null | import('#client').ValueSignal[]} */ (null); current_dependencies_index = 0; current_untracked_writes = null; current_consumer = signal; @@ -234,7 +234,7 @@ function execute_signal_fn(signal) { } else { res = /** @type {() => V} */ (init)(); } - let dependencies = /** @type {import('#client').Signal[]} **/ (signal.d); + let dependencies = /** @type {import('#client').ValueSignal[]} **/ (signal.d); if (current_dependencies !== null) { let i; if (dependencies !== null) { @@ -309,7 +309,7 @@ function execute_signal_fn(signal) { /** * @template V * @param {import('#client').Reaction} signal - * @param {import('#client').Signal} dependency + * @param {import('#client').ValueSignal} dependency * @returns {void} */ function remove_consumer(signal, dependency) { @@ -975,14 +975,14 @@ function set_signal_status(signal, status) { /** * @template V - * @param {V | import('#client').Signal} val - * @returns {val is import('#client').Signal} + * @param {V | import('#client').ValueSignal} val + * @returns {val is import('#client').ValueSignal} */ export function is_signal(val) { return ( typeof val === 'object' && val !== null && - typeof (/** @type {import('#client').Signal} */ (val).f) === 'number' + typeof (/** @type {import('#client').ValueSignal} */ (val).f) === 'number' ); } @@ -1271,7 +1271,7 @@ export function inspect(get_value, inspect = console.log) { /** * @template V - * @param {import('#client').Signal | (() => V)} value + * @param {import('#client').ValueSignal | (() => V)} value * @returns {V} */ export function unwrap(value) { diff --git a/packages/svelte/src/internal/client/types.d.ts b/packages/svelte/src/internal/client/types.d.ts index e01cd85750..1d9f1e34ce 100644 --- a/packages/svelte/src/internal/client/types.d.ts +++ b/packages/svelte/src/internal/client/types.d.ts @@ -1,5 +1,5 @@ import { STATE_SYMBOL } from './constants.js'; -import type { Reaction, Effect, Signal, Source } from './reactivity/types.js'; +import type { Effect, Source } from './reactivity/types.js'; export * from './reactivity/types.js'; @@ -85,7 +85,7 @@ export type StoreReferencesContainer = Record< store: Store | null; last_value: any; unsubscribe: Function; - value: Signal; + value: Source; } >;