diff --git a/packages/wouter-preact/types/index.d.ts b/packages/wouter-preact/types/index.d.ts index 4c7a308b..f0b8688a 100644 --- a/packages/wouter-preact/types/index.d.ts +++ b/packages/wouter-preact/types/index.d.ts @@ -81,9 +81,9 @@ export type NavigationalProps< > = ({ to: Path; href?: never } | { href: Path; to?: never }) & HookNavigationOptions; -type AsChildProps = - | ({ asChild?: false } & RequiredProps & DefaultElementProps) - | ({ asChild: true; children: ComponentChildren } & RequiredProps); +type AsChildProps = + | ({ asChild?: false } & ComponentProps & DefaultElementProps) + | ({ asChild: true; children: ComponentChildren } & ComponentProps); export type LinkProps = AsChildProps, JSX.HTMLAttributes>; diff --git a/packages/wouter/types/index.d.ts b/packages/wouter/types/index.d.ts index 594c8f0d..0d750da7 100644 --- a/packages/wouter/types/index.d.ts +++ b/packages/wouter/types/index.d.ts @@ -107,9 +107,9 @@ export function Redirect( context?: any ): ReactElement | null; -type AsChildProps = - | ({ asChild?: false } & RequiredProps & DefaultElementProps) - | ({ asChild: true; children: React.ReactNode } & RequiredProps); +type AsChildProps = + | ({ asChild?: false } & ComponentProps & DefaultElementProps) + | ({ asChild: true; children: React.ReactNode } & ComponentProps); export type LinkProps = AsChildProps<