UNPKG

@jameshclrk/rxdb-hooks

Version:

React hooks for integrating with RxDB

14 lines (13 loc) 556 B
import { Subject } from 'rxjs'; import { RxCollection, RxPlugin } from 'rxdb'; import { RxDatabaseBase } from 'rxdb/dist/types/rx-database'; type CollectionRecord = Record<string, RxCollection>; export type RxDatabaseBaseExtended<Internals = any, Options = any> = RxDatabaseBase<Internals, Options> & { newCollections$?: Subject<CollectionRecord>; }; /** * Extends RxDB prototype with a newCollections$ property: a stream emitting any * new collections added via addCollections(). */ export declare const observeNewCollections: RxPlugin; export {};