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