1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | import { match } from 'react-router';
|
13 | import * as React from 'react';
|
14 | import * as H from 'history';
|
15 |
|
16 | export {
|
17 | generatePath,
|
18 | PromptProps,
|
19 | Prompt,
|
20 | MemoryRouterProps,
|
21 | MemoryRouter,
|
22 | RedirectProps,
|
23 | Redirect,
|
24 | RouteChildrenProps,
|
25 | RouteComponentProps,
|
26 | RouteProps,
|
27 | Route,
|
28 | RouterProps,
|
29 | Router,
|
30 | StaticRouterProps,
|
31 | StaticRouter,
|
32 | SwitchProps,
|
33 | Switch,
|
34 | match,
|
35 | matchPath,
|
36 | withRouter,
|
37 | RouterChildContext,
|
38 | useHistory,
|
39 | useLocation,
|
40 | useParams,
|
41 | useRouteMatch,
|
42 | } from 'react-router';
|
43 |
|
44 | export interface BrowserRouterProps {
|
45 | basename?: string | undefined;
|
46 | getUserConfirmation?: ((message: string, callback: (ok: boolean) => void) => void) | undefined;
|
47 | forceRefresh?: boolean | undefined;
|
48 | keyLength?: number | undefined;
|
49 | }
|
50 | export class BrowserRouter extends React.Component<BrowserRouterProps, any> {}
|
51 |
|
52 | export interface HashRouterProps {
|
53 | basename?: string | undefined;
|
54 | getUserConfirmation?: ((message: string, callback: (ok: boolean) => void) => void) | undefined;
|
55 | hashType?: 'slash' | 'noslash' | 'hashbang' | undefined;
|
56 | }
|
57 | export class HashRouter extends React.Component<HashRouterProps, any> {}
|
58 |
|
59 | export interface LinkProps<S = H.LocationState> extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
60 | component?: React.ComponentType<any> | undefined;
|
61 | to: H.LocationDescriptor<S> | ((location: H.Location<S>) => H.LocationDescriptor<S>);
|
62 | replace?: boolean | undefined;
|
63 | innerRef?: React.Ref<HTMLAnchorElement> | undefined;
|
64 | }
|
65 | export function Link<S = H.LocationState>(
|
66 | ...params: Parameters<Link<S>>
|
67 | ): ReturnType<Link<S>>;
|
68 |
|
69 | export interface Link<S = H.LocationState>
|
70 | extends React.ForwardRefExoticComponent<
|
71 | React.PropsWithoutRef<LinkProps<S>> & React.RefAttributes<HTMLAnchorElement>
|
72 | > {}
|
73 |
|
74 | export interface NavLinkProps<S = H.LocationState> extends LinkProps<S> {
|
75 | activeClassName?: string | undefined;
|
76 | activeStyle?: React.CSSProperties | undefined;
|
77 | exact?: boolean | undefined;
|
78 | strict?: boolean | undefined;
|
79 | isActive?<Params extends { [K in keyof Params]?: string }>(match: match<Params> | null, location: H.Location<S>): boolean;
|
80 | location?: H.Location<S> | undefined;
|
81 | }
|
82 | export function NavLink<S = H.LocationState>(
|
83 |
|
84 | props: React.PropsWithoutRef<NavLinkProps<S>> & React.RefAttributes<HTMLAnchorElement>,
|
85 | ): ReturnType<NavLink<S>>;
|
86 | export interface NavLink<S = H.LocationState>
|
87 | extends React.ForwardRefExoticComponent<
|
88 | React.PropsWithoutRef<NavLinkProps<S>> & React.RefAttributes<HTMLAnchorElement>
|
89 | > {}
|
90 |
|
\ | No newline at end of file |