Parameter 'props' implicitly has an 'any' type

I'm a typescript noob. How do i specify that props should have hrefs and children. should i use typeof Link or something here?
No description
4 Replies
Matvey
Matvey15mo ago
ComponentProps<typeof Link> to get all possible props. or just
type MyLinkProps = {
href: String;
children: ReactNode;
}
type MyLinkProps = {
href: String;
children: ReactNode;
}
Ryan
RyanOP15mo ago
No description
Ryan
RyanOP15mo ago
'href' is specified more than once, so this usage will be overwritten.ts(2783) Is that how you would specify the type?
Matvey
Matvey15mo ago
yes
Want results from more Discord servers?
Add your server