diff --git a/types/react-router-dom/index.d.ts b/types/react-router-dom/index.d.ts index c16a334a08..22688beb66 100644 --- a/types/react-router-dom/index.d.ts +++ b/types/react-router-dom/index.d.ts @@ -4,6 +4,7 @@ // Huy Nguyen // Philip Jackson // John Reilly +// Sebastian Silbermann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -47,7 +48,7 @@ export class HashRouter extends React.Component {} export interface LinkProps extends React.AnchorHTMLAttributes { to: H.LocationDescriptor; replace?: boolean; - innerRef?: (node: HTMLAnchorElement | null) => void; + innerRef?: React.Ref; } export class Link extends React.Component {} diff --git a/types/react-router-dom/react-router-dom-tests.tsx b/types/react-router-dom/react-router-dom-tests.tsx index a7715e9ea1..9a524e88df 100644 --- a/types/react-router-dom/react-router-dom-tests.tsx +++ b/types/react-router-dom/react-router-dom-tests.tsx @@ -39,5 +39,7 @@ const Component: React.SFC = props => { ; -const acceptRef = (node: HTMLAnchorElement | null) => {}; -; +const refCallback: React.Ref = node => {}; +; +const ref = React.createRef(); +;