1 | import type { MutationHooks, QueryHooks } from './buildHooks';
|
2 | import type { EndpointDefinitions, QueryDefinition, MutationDefinition, QueryArgFrom } from '@reduxjs/toolkit/dist/query/endpointDefinitions';
|
3 | import type { Module } from '../apiTypes';
|
4 | import type { BaseQueryFn } from '@reduxjs/toolkit/dist/query/baseQueryTypes';
|
5 | import type { HooksWithUniqueNames } from './versionedTypes';
|
6 | import type { QueryKeys } from '../core/apiState';
|
7 | import type { PrefetchOptions } from '../core/module';
|
8 | export declare const reactHooksModuleName: unique symbol;
|
9 | export declare type ReactHooksModule = typeof reactHooksModuleName;
|
10 | declare module '@reduxjs/toolkit/dist/query/apiTypes' {
|
11 | interface ApiModules<BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions, ReducerPath extends string, TagTypes extends string> {
|
12 | [reactHooksModuleName]: {
|
13 | |
14 |
|
15 |
|
16 | endpoints: {
|
17 | [K in keyof Definitions]: Definitions[K] extends QueryDefinition<any, any, any, any, any> ? QueryHooks<Definitions[K]> : Definitions[K] extends MutationDefinition<any, any, any, any, any> ? MutationHooks<Definitions[K]> : never;
|
18 | };
|
19 | |
20 |
|
21 |
|
22 | usePrefetch<EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, options?: PrefetchOptions): (arg: QueryArgFrom<Definitions[EndpointName]>, options?: PrefetchOptions) => void;
|
23 | } & HooksWithUniqueNames<Definitions>;
|
24 | }
|
25 | }
|
26 | declare type RR = typeof import('react-redux');
|
27 | export interface ReactHooksModuleOptions {
|
28 | |
29 |
|
30 |
|
31 | batch?: RR['batch'];
|
32 | |
33 |
|
34 |
|
35 | useDispatch?: RR['useDispatch'];
|
36 | |
37 |
|
38 |
|
39 | useSelector?: RR['useSelector'];
|
40 | |
41 |
|
42 |
|
43 | useStore?: RR['useStore'];
|
44 | }
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | export declare const reactHooksModule: ({ batch, useDispatch, useSelector, useStore, }?: ReactHooksModuleOptions) => Module<ReactHooksModule>;
|
60 | export {};
|