Skip to content

Commit

Permalink
Fix typing for strictest (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim authored Sep 10, 2023
1 parent 09300dd commit 97b956b
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { Proxy } from './private/chainOfResponsibility';

import type { Props } from './private/types';

const Link = ({ children, className, href }: Props) => (
// TODO: Fix this typing.
// <Proxy className={className} href={href} request={href}>
<Proxy request={href} {...{ ...(className ? { className } : {}), ...(href ? { href } : {}) }}>
{children}
</Proxy>
);
const Link = (props: Props) => {
const { children, ...passingProps } = props;

return (
<Proxy {...passingProps} request={passingProps.href}>
{children}
</Proxy>
);
};

export default Link;

0 comments on commit 97b956b

Please sign in to comment.