Great article! It has been very helpful. Regarding the extension of Next's Link props, could you do something like this?
import NextLink, { LinkProps as NextLinkProps } from'next/link';
type InternalLinkProps = React.HTMLAttributes<HTMLAnchorElement> & NextLinkProps;
As of what I've tried, it seems to be working fine. I have to say though that I have very little experience with Typescript so I might be missing something important here.
Great tip Victor. I'm not sure why I didn't take that approach originally. I was learning typescript when I wrote this, but having worked with it now for several months, I've been using this technique quite a bit. Thanks for commenting.
Victor Cheeney
Great article! It has been very helpful. Regarding the extension of Next's Link props, could you do something like this?
import NextLink, { LinkProps as NextLinkProps } from 'next/link'; type InternalLinkProps = React.HTMLAttributes<HTMLAnchorElement> & NextLinkProps;As of what I've tried, it seems to be working fine. I have to say though that I have very little experience with Typescript so I might be missing something important here.