Skip to content

Commit 9d364e7

Browse files
DaleWebbTkDodo
andauthored
refactor(query-core): change QueryMeta and MutationMeta to an interface (#4253)
* refactor(query-core): change QueryMeta and MutationMeta to an interface * Apply suggestions from code review Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
1 parent 71e73c4 commit 9d364e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/query-core/src/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export interface InfiniteData<TData> {
4848
pageParams: unknown[]
4949
}
5050

51-
export type QueryMeta = Record<string, unknown>
51+
export interface QueryMeta {
52+
[index: string]: unknown
53+
}
5254

5355
export type NetworkMode = 'online' | 'always' | 'offlineFirst'
5456

@@ -534,7 +536,9 @@ export type MutationKey = readonly unknown[]
534536

535537
export type MutationStatus = 'idle' | 'loading' | 'success' | 'error'
536538

537-
export type MutationMeta = Record<string, unknown>
539+
export interface MutationMeta {
540+
[index: string]: unknown
541+
}
538542

539543
export type MutationFunction<TData = unknown, TVariables = unknown> = (
540544
variables: TVariables,

0 commit comments

Comments
 (0)