-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert the "ApiModule" move to fix TS errors
- Loading branch information
1 parent
69cba87
commit d2aaff0
Showing
3 changed files
with
55 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
import { reactHooksModuleName, ReactHooksBaseEndpoints } from './module' | ||
import { coreModule, coreModuleName } from '../core/module' | ||
import { buildCreateApi, CreateApi } from '../createApi' | ||
import { reactHooksModule, reactHooksModuleName } from './module' | ||
|
||
import { EndpointDefinitions } from '../endpointDefinitions' | ||
import { MutationHooks, QueryHooks } from './buildHooks' | ||
import { | ||
EndpointDefinitions, | ||
QueryDefinition, | ||
MutationDefinition, | ||
QueryArgFrom, | ||
} from '../endpointDefinitions' | ||
import { BaseQueryFn } from '../baseQueryTypes' | ||
import { HooksWithUniqueNames } from './versionedTypes' | ||
|
||
import { QueryKeys } from '../core/apiState' | ||
import { PrefetchOptions } from '../core/module' | ||
|
||
export * from '..' | ||
export { ApiProvider } from './ApiProvider' | ||
|
||
export { createApi } from './reactHooksCommonExports' | ||
export * from './reactHooksCommonExports' | ||
const createApi = buildCreateApi(coreModule(), reactHooksModule()) | ||
|
||
declare module '../apiTypes' { | ||
export interface ApiModules< | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
BaseQuery extends BaseQueryFn, | ||
Definitions extends EndpointDefinitions, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
ReducerPath extends string, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
TagTypes extends string | ||
> { | ||
[reactHooksModuleName]: ReactHooksBaseEndpoints<Definitions> & | ||
HooksWithUniqueNames<Definitions> | ||
} | ||
} | ||
export { createApi, reactHooksModule } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.