From 188dd0ae17f406cf9d95a86550fdcee38881facd Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Mon, 4 Dec 2023 10:35:53 +0100 Subject: [PATCH] remove unneccessary type --- src/testing/matchers/index.d.ts | 50 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/src/testing/matchers/index.d.ts b/src/testing/matchers/index.d.ts index 6936be4804c..65b10ba4fc8 100644 --- a/src/testing/matchers/index.d.ts +++ b/src/testing/matchers/index.d.ts @@ -10,11 +10,6 @@ import { ProfiledHook, } from "../internal/index.js"; -declare class WeakRef { - constructor(target: T); - deref(): T | undefined; -} - interface ApolloCustomMatchers { /** * Used to determine if two GraphQL query documents are equal to each other by @@ -25,30 +20,33 @@ interface ApolloCustomMatchers { /** * Used to determine if the Suspense cache has a cache entry. */ - toHaveSuspenseCacheEntryUsing: T extends ApolloClient ? - ( - query: DocumentNode, - options?: { - variables?: OperationVariables; - queryKey?: string | number | any[]; - } - ) => R - : { error: "matcher needs to be called on an ApolloClient instance" }; + toHaveSuspenseCacheEntryUsing: T extends ApolloClient + ? ( + query: DocumentNode, + options?: { + variables?: OperationVariables; + queryKey?: string | number | any[]; + } + ) => R + : { error: "matcher needs to be called on an ApolloClient instance" }; - toRerender: T extends ( - Profiler | ProfiledComponent | ProfiledHook - ) ? - (options?: NextRenderOptions) => Promise - : { error: "matcher needs to be called on a ProfiledComponent instance" }; + toRerender: T extends + | Profiler + | ProfiledComponent + | ProfiledHook + ? (options?: NextRenderOptions) => Promise + : { error: "matcher needs to be called on a ProfiledComponent instance" }; - toRenderExactlyTimes: T extends ( - Profiler | ProfiledComponent | ProfiledHook - ) ? - (count: number, options?: NextRenderOptions) => Promise - : { error: "matcher needs to be called on a ProfiledComponent instance" }; + toRenderExactlyTimes: T extends + | Profiler + | ProfiledComponent + | ProfiledHook + ? (count: number, options?: NextRenderOptions) => Promise + : { error: "matcher needs to be called on a ProfiledComponent instance" }; - toBeGarbageCollected: T extends WeakRef ? () => Promise - : { error: "matcher needs to be called on a WeakRef instance" }; + toBeGarbageCollected: T extends WeakRef + ? () => Promise + : { error: "matcher needs to be called on a WeakRef instance" }; } declare global {