UNPKG

svelte-firebase-state

Version:

Simplify Firebase integration in Svelte and SvelteKit with reactive state management for Firestore and Realtime Database.

17 lines (16 loc) 846 B
import { type AggregateSpec } from "firebase/firestore"; import { FirestoreState, type FirestoreStateOptions, type PathParam } from "./FirestoreState.svelte.js"; type CollectionAggregateStateOptions = Omit<FirestoreStateOptions<any, any>, "pathFunctionOrString" | "fromFirestore" | "toFirestore"> & { path: PathParam; aggregate: AggregateSpec; }; export declare class CollectionAggregateState<AggregateData = Record<string, unknown>> extends FirestoreState<any, any, AggregateData | null> { private readonly aggregate; private queryRef; constructor({ auth, firestore, path: pathFunctionOrString, listen, aggregate }: CollectionAggregateStateOptions); private get_collection_from_path; protected init(): Promise<void>; protected fetch_data(): Promise<void>; protected listen_data(): Promise<void>; } export {};