-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace internal types with
@tanstack/query-core
types (#34)
* refactor: replace internal types with @tanstack/query-core * chore: add changeset * chore: update changeset
- Loading branch information
1 parent
4d56c4a
commit abb3596
Showing
4 changed files
with
16 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@lukemorales/query-key-factory': minor | ||
--- | ||
|
||
Replace internal types with official `@tanstack/query-core` types |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 +1 @@ | ||
export type QueryKey = readonly unknown[]; | ||
|
||
/** | ||
* @internal use QueryFunction from "@tanstack/query-core" instead | ||
*/ | ||
export type QueryFunction<T = unknown, TQueryKey extends QueryKey = QueryKey> = ( | ||
context?: QueryFunctionContext<TQueryKey>, | ||
) => T | Promise<T>; | ||
|
||
/** | ||
* @internal use QueryFunctionContext from "@tanstack/query-core" instead | ||
*/ | ||
export type QueryFunctionContext<TQueryKey extends QueryKey = QueryKey, TPageParam = any> = { | ||
queryKey: TQueryKey; | ||
signal?: AbortSignal; | ||
pageParam?: TPageParam; | ||
meta: QueryMeta | undefined; | ||
}; | ||
|
||
type QueryMeta = Record<string, unknown>; | ||
export type { QueryKey, QueryMeta, QueryFunction, QueryFunctionContext } from '@tanstack/query-core'; |