From d29b89c1a85b0d7379affaab5abdd45aa68effb1 Mon Sep 17 00:00:00 2001 From: Sam Baeck <> Date: Mon, 13 Aug 2018 22:49:28 +0200 Subject: [PATCH] updated tsconfig, fixed broken tests --- types/react-router-hash-link/index.d.ts | 1 + ...link-tests.ts => react-router-hash-link-tests.tsx} | 11 ++++++----- types/react-router-hash-link/tsconfig.json | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) rename types/react-router-hash-link/{react-router-hash-link-tests.ts => react-router-hash-link-tests.tsx} (72%) diff --git a/types/react-router-hash-link/index.d.ts b/types/react-router-hash-link/index.d.ts index 545a31cc71..9480f1aef0 100644 --- a/types/react-router-hash-link/index.d.ts +++ b/types/react-router-hash-link/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rafrex/react-router-hash-link (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.) // Definitions by: Sam Baeck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 import * as React from 'react'; import { LinkProps, NavLinkProps } from 'react-router-dom'; diff --git a/types/react-router-hash-link/react-router-hash-link-tests.ts b/types/react-router-hash-link/react-router-hash-link-tests.tsx similarity index 72% rename from types/react-router-hash-link/react-router-hash-link-tests.ts rename to types/react-router-hash-link/react-router-hash-link-tests.tsx index 7825bbf6c4..4c64a1b5c3 100644 --- a/types/react-router-hash-link/react-router-hash-link-tests.ts +++ b/types/react-router-hash-link/react-router-hash-link-tests.tsx @@ -9,15 +9,16 @@ interface Props extends NavHashLinkProps { const getIsActive = (extraProp: string) => (match: match, location: H.Location) => !!extraProp; -export default function (props: Props) { +export default function(props: Props) { const {extraProp, ...rest} = props; const isActive = getIsActive(extraProp); return ( -); + ); } - +; -const acceptRef = (node: HTMLAnchorElement | null) => {}; -; \ No newline at end of file +const acceptRef = (node: HTMLAnchorElement | null) => { +}; +; diff --git a/types/react-router-hash-link/tsconfig.json b/types/react-router-hash-link/tsconfig.json index 892d3999e3..fc830ac41d 100644 --- a/types/react-router-hash-link/tsconfig.json +++ b/types/react-router-hash-link/tsconfig.json @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "react-router-hash-link-tests.ts" + "react-router-hash-link-tests.tsx" ] }