mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
updated tsconfig, fixed broken tests
This commit is contained in:
parent
e04532a2b1
commit
d29b89c1a8
1
types/react-router-hash-link/index.d.ts
vendored
1
types/react-router-hash-link/index.d.ts
vendored
@ -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 <https://github.com/zoompie>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from 'react';
|
||||
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
||||
|
||||
@ -9,15 +9,16 @@ interface Props extends NavHashLinkProps {
|
||||
|
||||
const getIsActive = (extraProp: string) => (match: match<any>, location: H.Location) => !!extraProp;
|
||||
|
||||
export default function (props: Props) {
|
||||
export default function(props: Props) {
|
||||
const {extraProp, ...rest} = props;
|
||||
const isActive = getIsActive(extraProp);
|
||||
return (
|
||||
<NavHashLink {...rest} isActive={isActive} />
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
<HashLink to="url" />
|
||||
<HashLink to="url" />;
|
||||
|
||||
const acceptRef = (node: HTMLAnchorElement | null) => {};
|
||||
<HashLink to="/url" replace={true} innerRef={acceptRef} />;
|
||||
const acceptRef = (node: HTMLAnchorElement | null) => {
|
||||
};
|
||||
<HashLink to="/url" replace={true} innerRef={acceptRef} />;
|
||||
@ -19,6 +19,6 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-router-hash-link-tests.ts"
|
||||
"react-router-hash-link-tests.tsx"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user