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
Matvey14mo ago
ComponentProps<typeof Link> to get all possible props. or just
type MyLinkProps = {
href: String;
children: ReactNode;
}
type MyLinkProps = {
href: String;
children: ReactNode;
}
machina
machina14mo ago
No description
machina
machina14mo ago
'href' is specified more than once, so this usage will be overwritten.ts(2783) Is that how you would specify the type?
Matvey
Matvey14mo ago
yes
Want results from more Discord servers?
Add your server