UNPKG

627 BTypeScriptView Raw
1/// <reference types="node" />
2import React from 'react';
3import { UrlObject } from 'url';
4declare type Url = string | UrlObject;
5export declare type LinkProps = {
6 href: Url;
7 as?: Url;
8 replace?: boolean;
9 scroll?: boolean;
10 shallow?: boolean;
11 passHref?: boolean;
12 prefetch?: boolean;
13 locale?: string | false;
14};
15declare function Link(props: React.PropsWithChildren<LinkProps>): React.DetailedReactHTMLElement<{
16 onMouseEnter?: React.MouseEventHandler<Element> | undefined;
17 onClick: React.MouseEventHandler;
18 href?: string | undefined;
19 ref?: any;
20}, HTMLElement>;
21export default Link;