mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Update LinkProps to current typings This allows use in stateless higher order components. * Add test for stateless HOC using LinkProps
20 lines
585 B
TypeScript
20 lines
585 B
TypeScript
import * as React from 'react';
|
|
import Router from './Router';
|
|
|
|
declare const Link: Link;
|
|
type Link = Link.Link;
|
|
|
|
export default Link;
|
|
|
|
declare namespace Link {
|
|
interface LinkProps extends React.HTMLAttributes<Link> {
|
|
activeStyle?: React.CSSProperties;
|
|
activeClassName?: string;
|
|
onlyActiveOnIndex?: boolean;
|
|
to: Router.RoutePattern | Router.LocationDescriptor | ((...args: any[]) => Router.LocationDescriptor);
|
|
}
|
|
|
|
interface Link extends React.ComponentClass<LinkProps> {}
|
|
interface LinkElement extends React.ReactElement<LinkProps> {}
|
|
}
|