From 9d364e75bcc5fa44a00e1cff2f79fbd79ca89de5 Mon Sep 17 00:00:00 2001 From: Dale Alexander Webb Date: Fri, 7 Oct 2022 20:06:28 +0100 Subject: [PATCH] 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 --- packages/query-core/src/types.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/query-core/src/types.ts b/packages/query-core/src/types.ts index ac11e48912..d9ad805cd9 100644 --- a/packages/query-core/src/types.ts +++ b/packages/query-core/src/types.ts @@ -48,7 +48,9 @@ export interface InfiniteData { pageParams: unknown[] } -export type QueryMeta = Record +export interface QueryMeta { + [index: string]: unknown +} export type NetworkMode = 'online' | 'always' | 'offlineFirst' @@ -534,7 +536,9 @@ export type MutationKey = readonly unknown[] export type MutationStatus = 'idle' | 'loading' | 'success' | 'error' -export type MutationMeta = Record +export interface MutationMeta { + [index: string]: unknown +} export type MutationFunction = ( variables: TVariables,