UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

17 lines (16 loc) • 952 B
import { Collection, CollectionImpl } from './collection/index.js'; import { DbClient } from './client.js'; import { LiveQueryCollectionConfig } from './query/index.js'; export type LiveQueryKey = ReadonlyArray<unknown>; export type LiveQueryOptions = LiveQueryCollectionConfig<any> & { queryKey?: LiveQueryKey; }; export type DeferredLiveQueryCollections = Set<CollectionImpl<any, string | number, any, any, any>>; export declare function prepareLiveQueryValue(value: unknown, dbClient: DbClient | undefined, deferredCollections: DeferredLiveQueryCollections): unknown; export declare function getPreparedLiveQueryIdentity(value: unknown): unknown; export declare function getLiveQueryHash(preparedValue: unknown, queryKey?: LiveQueryKey): string; export declare function resolveLiveQueryValue(value: unknown, { gcTime, pool, startSync, }?: { gcTime?: number; pool?: boolean; startSync?: boolean; }): Collection<any, any, any> | null;