UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

16 lines (15 loc) • 915 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 }?: { gcTime?: number; pool?: boolean; }): Collection<any, any, any> | null;