Skip to content

Commit

Permalink
refactor(query-core): change QueryMeta and MutationMeta to an interfa…
Browse files Browse the repository at this point in the history
…ce (#4253)

* refactor(query-core): change QueryMeta and MutationMeta to an interface

* Apply suggestions from code review

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
  • Loading branch information
DaleWebb and TkDodo authored Oct 7, 2022
1 parent 71e73c4 commit 9d364e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/query-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export interface InfiniteData<TData> {
pageParams: unknown[]
}

export type QueryMeta = Record<string, unknown>
export interface QueryMeta {
[index: string]: unknown
}

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

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

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

export type MutationMeta = Record<string, unknown>
export interface MutationMeta {
[index: string]: unknown
}

export type MutationFunction<TData = unknown, TVariables = unknown> = (
variables: TVariables,
Expand Down

0 comments on commit 9d364e7

Please sign in to comment.