Gatsby: Latest @types/reach_router release makes GatsbyLinkProps innerRef type incompatible

Created on 1 Apr 2020  路  2Comments  路  Source: gatsbyjs/gatsby

Description

With the release of a change to the type of the innerRef property inside LinkProps,
the GatsbyLinkProps interface is wrong. That breaks any Gatsby build using Typescript due to incompatible types.

Context here:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43367

InnerRef prop currently defined in LinkProps interface

innerRef?: React.RefCallback<HTMLAnchorElement>;

Current innerRef type in GatsbyLinkProps interface

innerRef?: Function;
bug

Most helpful comment

This should be fixed in [email protected] / [email protected]

All 2 comments

Ok, so likely fix here is to drop "our" innerRef and bump @types/reach__router?

Also how exactly does it break? I tried one of typescript starters and it didn't give me any problems (even when using innerRef)

This should be fixed in [email protected] / [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theduke picture theduke  路  3Comments

kalinchernev picture kalinchernev  路  3Comments

signalwerk picture signalwerk  路  3Comments

hobochild picture hobochild  路  3Comments

ferMartz picture ferMartz  路  3Comments