import Realm from "realm"; import { AnyRealmObject, RealmClassType } from "./helpers"; type QueryCallback = (collection: Realm.Results) => Realm.Results; type DependencyList = ReadonlyArray; export type QueryHookPartialOptions = { type: string | RealmClassType; keyPaths?: string | string[]; }; export type QueryHookOptions = QueryHookPartialOptions & { query?: QueryCallback; }; export type UseQueryHook = { (options: QueryHookOptions, deps?: DependencyList): Realm.Results>; (options: QueryHookOptions, deps?: DependencyList): Realm.Results; (type: string): Realm.Results>; (type: RealmClassType): Realm.Results; (query: QueryCallback, deps: DependencyList, options: QueryHookPartialOptions): Realm.Results; (query: QueryCallback, deps: DependencyList, options: QueryHookPartialOptions): Realm.Results>; /** @deprecated To help the `react-hooks/exhaustive-deps` eslint rule detect missing dependencies, we've suggest passing a option object as the first argument */ (type: string, query?: QueryCallback, deps?: DependencyList): Realm.Results>; /** @deprecated To help the `react-hooks/exhaustive-deps` eslint rule detect missing dependencies, we've suggest passing a option object as the first argument */ (type: RealmClassType, query?: QueryCallback, deps?: DependencyList): Realm.Results; }; /** * Generates the `useQuery` hook from a given `useRealm` hook. * @param useRealm - Hook that returns an open Realm instance * @returns useObject - Hook that is used to gain access to a {@link Realm.Collection} */ export declare function createUseQuery(useRealm: () => Realm): UseQueryHook; export {}; //# sourceMappingURL=useQuery.d.ts.map