Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

utils.ts

10 lines279 Bytes

1import type { Readable } from 'svelte/store'
2import type { StoreOrVal } from './types'
3​
4export function isSvelteStore<T extends object>(
5 obj: StoreOrVal<T>,
6): obj is Readable<T> {
7 return 'subscribe' in obj && typeof obj.subscribe === 'function'
8}
9​
10export function noop() {}