UNPKG

mantine-entity

Version:

A library combining Mantine, TanStack Query, and Mantine React Table for efficient entity management

16 lines (15 loc) 690 B
import { UseQueryOptions, QueryKey } from "@tanstack/react-query"; interface FetchParams<TArgs> { url: string; method: "GET" | "POST" | "PUT" | "DELETE"; body?: TArgs; headers?: HeadersInit; } interface UseFetchParams<TResponse, TArgs> { key: QueryKey; fetchParams: FetchParams<TArgs>; options?: Omit<UseQueryOptions<TResponse>, "queryKey" | "queryFn">; httpGet<TResponse>(url: string): Promise<TResponse>; } export declare function useFetchQuery<TResponse, TArgs>({ key, fetchParams, options, httpGet }: UseFetchParams<TResponse, TArgs>): import("@tanstack/react-query").UseQueryResult<import("@tanstack/react-query").NoInfer<TResponse>, Error>; export {};