Using TS 4.x, Material UI latest alpha and next.js latest I am getting the following error in the Link.tsx component
if (naked) {
return (
<NextComposed
className={className}
ref={innerRef}
href={href}
{...other}
/>
)
}
the error comes when assigning the innerRef to the ref prop of the NextComposed component
Type '((instance: HTMLSpanElement | null) => void) | RefObject<HTMLSpanElement> | (((instance: HTMLAnchorElement | null) => void) & ((instance: any) => void)) | ... 4 more ... | undefined' is not assignable to type '((instance: HTMLAnchorElement | null) => void) | RefObject<HTMLAnchorElement> | null | undefined'.
Type 'RefObject<HTMLSpanElement>' is not assignable to type '((instance: HTMLAnchorElement | null) => void) | RefObject<HTMLAnchorElement> | null | undefined'.
Type 'RefObject<HTMLSpanElement>' is not assignable to type 'RefObject<HTMLAnchorElement>'.
Type 'HTMLSpanElement' is missing the following properties from type 'HTMLAnchorElement': charset, coords, download, hreflang, and 21 more.
I've only been working with TS for a few weeks now so not able to figure out the correct typings required here.
Any help would be appreciated
Using TS 4.x, Material UI latest alpha and next.js latest I am getting the following error in the Link.tsx component
the error comes when assigning the innerRef to the ref prop of the NextComposed component
I've only been working with TS for a few weeks now so not able to figure out the correct typings required here.
Any help would be appreciated