11import type { Api } from '@reduxjs/toolkit/query'
22import type { StandardSchemaV1 } from '@standard-schema/spec'
3+ import type { AnyFunction } from '../tsHelpers'
34import type {
45 BaseQueryApi ,
56 BaseQueryArg ,
@@ -29,6 +30,7 @@ import type {
2930} from './core/index'
3031import type { SerializeQueryArgs } from './defaultSerializeQueryArgs'
3132import type { NEVER } from './fakeBaseQuery'
33+ import type { NamedSchemaError } from './standardSchema'
3234import type {
3335 CastAny ,
3436 HasRequiredProps ,
@@ -38,7 +40,6 @@ import type {
3840 UnwrapPromise ,
3941} from './tsHelpers'
4042import { isNotNullish } from './utils'
41- import type { NamedSchemaError } from './standardSchema'
4243
4344const rawResultType = /* @__PURE__ */ Symbol ( )
4445const resultType = /* @__PURE__ */ Symbol ( )
@@ -906,18 +907,18 @@ export interface InfiniteQueryExtraOptions<
906907 * `initialPageParam` may be specified when using the
907908 * endpoint, to override the default value.
908909 * `maxPages` and `getPreviousPageParam` are both optional.
909- *
910+ *
910911 * @example
911- *
912+ *
912913 * ```ts
913914 * // codeblock-meta title="infiniteQueryOptions example"
914915 * import { createApi, fetchBaseQuery, defaultSerializeQueryArgs } from '@reduxjs/toolkit/query/react'
915- *
916+ *
916917 * type Pokemon = {
917918 * id: string
918919 * name: string
919920 * }
920- *
921+ *
921922 * const pokemonApi = createApi({
922923 * baseQuery: fetchBaseQuery({ baseUrl: 'https://pokeapi.co/api/v2/' }),
923924 * endpoints: (build) => ({
@@ -942,7 +943,7 @@ export interface InfiniteQueryExtraOptions<
942943 * }),
943944 * }),
944945 * })
945-
946+
946947 * ```
947948 */
948949 infiniteQueryOptions : InfiniteQueryConfigOptions <
@@ -1423,7 +1424,7 @@ export function calculateProvidedBy<ResultType, QueryArg, ErrorType, MetaType>(
14231424 return [ ]
14241425}
14251426
1426- function isFunction < T > ( t : T ) : t is Extract < T , Function > {
1427+ function isFunction < T > ( t : T ) : t is Extract < T , AnyFunction > {
14271428 return typeof t === 'function'
14281429}
14291430
0 commit comments