import type { StoreOrVal } from '@tanstack/svelte-query' import type { Readable } from 'svelte/store' export function isStore(obj: StoreOrVal): obj is Readable { return ( obj != null && typeof obj === 'object' && 'subscribe' in obj && typeof obj.subscribe === 'function' ) }