UNPKG

@nuxtjs/sanity

Version:
16 lines (15 loc) 573 B
import type { QueryStore } from '@sanity/core-loader'; import type { ContentSourceMap, QueryParams } from '../../client.js'; /** * Internal composable used to setup update streaming from Presentation tool * over postMessage (via `@sanity/comlink`). * @internal */ export declare const useSanityQueryFetcher: <T = unknown, E = Error>({ onSnapshot, params, query, queryStore, }: { onSnapshot: (data: T, sourceMap: ContentSourceMap | undefined) => void; params?: QueryParams; query: string; queryStore?: QueryStore; }) => { unsubscribe: () => void; };