From 3fb793662d72a039a968f79f57e0c8b4b7d96456 Mon Sep 17 00:00:00 2001 From: Moustapha HappyDev Date: Sat, 7 Dec 2024 02:40:29 +0000 Subject: [PATCH] remove hack in test types --- packages/lucide-astro/tests/utils/types.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/lucide-astro/tests/utils/types.ts b/packages/lucide-astro/tests/utils/types.ts index 59b4f5ff56..85dc15d3e3 100644 --- a/packages/lucide-astro/tests/utils/types.ts +++ b/packages/lucide-astro/tests/utils/types.ts @@ -1,4 +1,4 @@ -import { getQueriesForElement, } from '@testing-library/dom' +import type { queries, BoundFunctions } from '@testing-library/dom' import type { ContainerRenderOptions } from "astro/container"; import type { ComponentProps } from "astro/types" import type { AstroComponentFactory } from "astro/runtime/server/index.js"; @@ -21,15 +21,4 @@ type ContainerRenderOptionsWithInferedProps type PossibleComponentType = AstroComponentFactory | AstroComponentVirtualType type AstroComponentVirtualType = (args: any) => any; -type Queries = ReturnType - -// HACK: to unwrap the return type of getQueriesForElement -// without calling the function -// May possibly just use `ReturnType` if the function's ReturnType -// doesn't depend on the first parameter, didn't check that yet -// too much to digest for me rn 😛 -class Wrapper { - wrapped(e: HTMLElement) { - return getQueriesForElement(e) - } -} +type Queries = BoundFunctions