From 9c9457e4753c6374f9377143f751231d7c900a49 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:51:03 +1000 Subject: [PATCH] Fix types --- .../etc/angular-query-experimental.api.md | 4 ++-- packages/query-core/src/utils.ts | 3 ++- packages/vue-query/src/utils.ts | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/angular-query-experimental/etc/angular-query-experimental.api.md b/packages/angular-query-experimental/etc/angular-query-experimental.api.md index b58ce9d1da..93d21fb4c4 100644 --- a/packages/angular-query-experimental/etc/angular-query-experimental.api.md +++ b/packages/angular-query-experimental/etc/angular-query-experimental.api.md @@ -17,7 +17,7 @@ import { InjectOptions } from '@angular/core'; import { Injector } from '@angular/core'; import type { MutateFunction } from '@tanstack/query-core'; import type { Mutation } from '@tanstack/query-core'; -import { MutationFilters } from '@tanstack/query-core'; +import type { MutationFilters } from '@tanstack/query-core'; import type { MutationObserverOptions } from '@tanstack/query-core'; import type { MutationObserverResult } from '@tanstack/query-core'; import type { MutationState } from '@tanstack/query-core'; @@ -25,7 +25,7 @@ import type { OmitKeyof } from '@tanstack/query-core'; import { Provider } from '@angular/core'; import type { QueriesPlaceholderDataFunction } from '@tanstack/query-core'; import type { QueryClient } from '@tanstack/query-core'; -import { QueryFilters } from '@tanstack/query-core'; +import type { QueryFilters } from '@tanstack/query-core'; import type { QueryFunction } from '@tanstack/query-core'; import type { QueryKey } from '@tanstack/query-core'; import type { QueryObserverOptions } from '@tanstack/query-core'; diff --git a/packages/query-core/src/utils.ts b/packages/query-core/src/utils.ts index f74f691370..40973853cf 100644 --- a/packages/query-core/src/utils.ts +++ b/packages/query-core/src/utils.ts @@ -305,7 +305,8 @@ export function isPlainArray(value: unknown) { } // Copied from: https://github.com/jonschlinkert/is-plain-object -export function isPlainObject(o: any): o is object { +// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types +export function isPlainObject(o: any): o is Object { if (!hasObjectPrototype(o)) { return false } diff --git a/packages/vue-query/src/utils.ts b/packages/vue-query/src/utils.ts index 66d65fc84a..0f25d0ffda 100644 --- a/packages/vue-query/src/utils.ts +++ b/packages/vue-query/src/utils.ts @@ -96,7 +96,8 @@ export function cloneDeepUnref( }) } -function isPlainObject(value: unknown): value is object { +// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types +function isPlainObject(value: unknown): value is Object { if (Object.prototype.toString.call(value) !== '[object Object]') { return false }