import { Store } from "./store.js"; import { Connection } from "./connection.js"; import { UnsubscribeFunc } from "./types.js"; export declare type Collection = { state: State; refresh(): Promise; subscribe(subscriber: (state: State) => void): UnsubscribeFunc; }; export declare const getCollection: (conn: Connection, key: string, fetchCollection: (conn: Connection) => Promise, subscribeUpdates?: ((conn: Connection, store: Store) => Promise) | undefined) => Collection; export declare const createCollection: (key: string, fetchCollection: (conn: Connection) => Promise, subscribeUpdates: ((conn: Connection, store: Store) => Promise) | undefined, conn: Connection, onChange: (state: State) => void) => UnsubscribeFunc;