Skip to content

Commit

Permalink
remove hack in test types
Browse files Browse the repository at this point in the history
  • Loading branch information
MoustaphaDev committed Dec 7, 2024
1 parent ca9e810 commit 3fb7936
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions packages/lucide-astro/tests/utils/types.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -21,15 +21,4 @@ type ContainerRenderOptionsWithInferedProps<T extends AstroComponentVirtualType>
type PossibleComponentType = AstroComponentFactory | AstroComponentVirtualType
type AstroComponentVirtualType = (args: any) => any;

type Queries = ReturnType<Wrapper["wrapped"]>

// 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<typeof queries>

0 comments on commit 3fb7936

Please sign in to comment.