From 2dec5df187e41f4931c7c176cc6ac6f3abf3f958 Mon Sep 17 00:00:00 2001 From: Alexey Taktarov Date: Sun, 17 Dec 2023 11:13:25 +0100 Subject: [PATCH] Add type spec for ComponentProps. --- packages/wouter/test/link.test-d.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/wouter/test/link.test-d.tsx b/packages/wouter/test/link.test-d.tsx index 339dd501..54824c04 100644 --- a/packages/wouter/test/link.test-d.tsx +++ b/packages/wouter/test/link.test-d.tsx @@ -1,5 +1,5 @@ import { describe, expectTypeOf, it } from "vitest"; -import { Link, type Path } from "wouter"; +import { Link, LinkProps, type Path } from "wouter"; import * as React from "react"; type NetworkLocationHook = () => [ @@ -190,4 +190,11 @@ describe(" with `asChild` prop", () => { Hello ; }); + + it.skip("should work with `ComponentProps`", () => { + type LinkComponentProps = React.ComponentProps; + + // @ts-expect-error FIXME + expectTypeOf().toEqualTypeOf(); + }); });