diff --git a/packages/svelte-query/src/createBaseQuery.svelte.ts b/packages/svelte-query/src/createBaseQuery.svelte.ts index 1a68792841..81e261dcf4 100644 --- a/packages/svelte-query/src/createBaseQuery.svelte.ts +++ b/packages/svelte-query/src/createBaseQuery.svelte.ts @@ -61,14 +61,15 @@ export function createBaseQuery< return defaultedOptions } - const defaultedOptionsStore = $derived(updateOptions) + const defaultedOptionsStore = updateOptions /** Creates the observer */ - const observer = $derived( - new Observer( - client, - defaultedOptionsStore(), - ), - ) + const observer = new Observer< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >(client, defaultedOptionsStore()) let result = $state>( observer.getOptimisticResult(defaultedOptionsStore()),