UNPKG

rxdb

Version:

A local-first realtime NoSQL Database for JavaScript applications - https://rxdb.info/

10 lines (9 loc) 598 B
import type { CollectionsOfDatabase, RxDatabase } from '../../../types/index.d.ts'; /** * The `useRxDatabase` hook retrieves the RxDB database instance from context. * * @returns The RxDB database instance. * @throws {Error} Throws an error if the component is not wrapped in a <RxDatabaseProvider>. * This ensures the database context is properly initialized before use. */ export declare function useRxDatabase<Collections = CollectionsOfDatabase, Internals = any, InstanceCreationOptions = any, Reactivity = any>(): RxDatabase<Collections, Internals, InstanceCreationOptions, Reactivity>;