Skip to content

Commit

Permalink
chore(queryCache): add parameter for makeQueryCache to types (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
PepijnSenders committed Jun 17, 2020
1 parent a90274d commit 5de7214
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export function useInfiniteQuery<
config?: InfiniteQueryOptions<TResult, TMoreVariable, TError>
): InfiniteQueryResult<TResult, TMoreVariable, TError>

export type DefinedQueryKeyPart =
export type DefinedQueryKeyPart =
| string
| object
| boolean
Expand Down Expand Up @@ -706,10 +706,17 @@ export interface QueryCache {

export const queryCache: QueryCache

export interface MakeQueryCacheOptions {
frozen?: boolean
defaultConfig?: BaseQueryOptions
}

/**
* a factory that creates a new query cache
*/
export function makeQueryCache(): QueryCache
export function makeQueryCache(
makeQueryCacheOptions: MakeQueryCacheOptions
): QueryCache

/**
* A hook that uses the query cache context
Expand Down

0 comments on commit 5de7214

Please sign in to comment.