-
Notifications
You must be signed in to change notification settings - Fork 76
/
index.d.ts
51 lines (38 loc) · 1.25 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/// <reference types="react"/>
import * as React from 'react';
export class HashRouter extends React.Component<any> {}
export class BrowserRouter extends React.Component<any> {}
export class InnerRouter extends React.Component<any> {}
export class MemoryRouter extends React.Component<any> {}
export type Filter = (cb: () => void, props: any) => void;
export interface RouteProps {
path?: string;
component?: React.ComponentType;
loadComponent?: (cb: (comp: React.ComponentType<any>) => void) => void;
cache?: boolean;
index?: boolean;
miss?: boolean;
enterFilter?: Filter | Filter[];
leaveFilter?: Filter | Filter[];
children?: JSX.Element;
}
export class Route extends React.Component<RouteProps> {}
export interface LinkProps {
to: string;
state?: any;
type?: string;
className?: string;
activeClassName?: string;
activeStyle?: React.CSSProperties;
children?: JSX.Element;
isActive?: boolean;
}
export class Link extends React.Component<LinkProps> {}
export class CacheLink extends React.Component<LinkProps> {}
export class Control {
static readonly path: string;
static readonly state: any;
static go(pathOrIndex: string | number, state?: any): void;
static replace(pathOrIndex: string | number, state?: any): void;
private constructor();
}