1 | import type React from 'react';
|
2 | export interface StaticContext {
|
3 | statusCode?: number | undefined;
|
4 | }
|
5 | export interface match<Params extends {
|
6 | [K in keyof Params]?: string;
|
7 | } = Record<string, any>> {
|
8 | params: Params;
|
9 | isExact: boolean;
|
10 | path: string;
|
11 | url: string;
|
12 | }
|
13 | export type LinkProps = {
|
14 | to: string;
|
15 | replace?: boolean;
|
16 | innerRef?: React.Ref<HTMLAnchorElement>;
|
17 | } & React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
18 | export type MenuDataItem = {
|
19 |
|
20 | children?: MenuDataItem[];
|
21 | routes?: undefined;
|
22 |
|
23 | hideChildrenInMenu?: boolean;
|
24 |
|
25 | hideInMenu?: boolean;
|
26 |
|
27 | icon?: React.ReactNode;
|
28 |
|
29 | locale?: string | false;
|
30 |
|
31 | name?: string;
|
32 |
|
33 | key?: string;
|
34 |
|
35 | disabled?: boolean;
|
36 |
|
37 | disabledTooltip?: boolean;
|
38 |
|
39 | path?: string;
|
40 | |
41 |
|
42 |
|
43 |
|
44 |
|
45 | parentKeys?: string[];
|
46 |
|
47 | flatMenu?: boolean;
|
48 |
|
49 | target?: string;
|
50 | |
51 |
|
52 |
|
53 | tooltip?: string;
|
54 | [key: string]: any;
|
55 | };
|
56 | export type Route = Omit<MenuDataItem, 'routes'> & {
|
57 | children?: Route[];
|
58 | };
|
59 | export type WithFalse<T> = T | false;
|
60 | export type RouterTypes = {
|
61 | computedMatch?: match<any>;
|
62 | route?: Route;
|
63 | location: {
|
64 | pathname?: string;
|
65 | };
|
66 | };
|
67 | export type MessageDescriptor = {
|
68 | id: any;
|
69 | description?: string;
|
70 | defaultMessage?: string;
|
71 | };
|