@openapi-qraft/react
Version:
OpenAPI client for React, providing type-safe requests and dynamic TanStack Query React Hooks via a modular, Proxy-based architecture.
1 lines • 1.33 kB
Source Map (JSON)
{"version":3,"file":"prefetchInfiniteQuery.cjs","sources":["../../../src/callbacks/prefetchInfiniteQuery.ts"],"sourcesContent":["import type { ServiceOperationFetchInfiniteQuery } from '@openapi-qraft/tanstack-query-react-types';\nimport type { DefaultError } from '@tanstack/react-query';\nimport type { CreateAPIQueryClientOptions } from '../qraftAPIClient.js';\nimport { callQueryClientMethodWithQueryKey } from '../lib/callQueryClientFetchMethod.js';\n\nexport const prefetchInfiniteQuery: <\n TSchema extends { url: string; method: 'get' | 'head' | 'options' },\n TData,\n TParams,\n>(\n qraftOptions: CreateAPIQueryClientOptions,\n schema: TSchema,\n args: Parameters<\n ServiceOperationFetchInfiniteQuery<\n TSchema,\n TData,\n TParams,\n DefaultError\n >['prefetchInfiniteQuery']\n >\n) => Promise<TData> = (qraftOptions, schema, args) => {\n return callQueryClientMethodWithQueryKey(\n qraftOptions,\n 'prefetchInfiniteQuery',\n schema,\n true,\n args as never\n ) as never;\n};\n"],"names":["prefetchInfiniteQuery","qraftOptions","schema","args","callQueryClientMethodWithQueryKey"],"mappings":";;;;AAKaA,MAAAA,qBAAAA,GAeS,CAACC,YAAAA,EAAcC,MAAQC,EAAAA,IAAAA,GAAAA;AAC3C,IAAA,OAAOC,4DACLH,CAAAA,YAAAA,EACA,uBACAC,EAAAA,MAAAA,EACA,IACAC,EAAAA,IAAAA,CAAAA,CAAAA;AAEJ;;;;"}