Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/query-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export interface InfiniteData<TData> {
pageParams: unknown[]
}

export type QueryMeta = Record<string, unknown>
export interface QueryMeta {
[x: string]: unknown
TkDodo marked this conversation as resolved.
Show resolved Hide resolved
}

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

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

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

export type MutationMeta = Record<string, unknown>
export interface MutationMeta {
[x: string]: unknown
TkDodo marked this conversation as resolved.
Show resolved Hide resolved
}

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