-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.d.ts
38 lines (27 loc) · 1.14 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
export as namespace ReactRouterServer;
export = ReactRouterServer;
import { Component, ReactElement, ReactNode } from 'react';
declare namespace ReactRouterServer {
type ExtractedModule = {
id: string,
files: Array<any>;
};
function extractModules(modules: Array<any>, stats: any): Array<ExtractedModule>;
function fetchState<P, S>(mapStateToProps?: (state: any) => any, mapActionsToProps?: (actions: { done: (state: any) => void }) => any): Component<P, S>;
function withDone(WrappedComponent: Component): Component;
interface ModuleProps {
module: () => any;
children?: (module: any) => any;
}
class Module<P extends ModuleProps, S> extends Component<P, S> {
}
function preload(modules: any): Promise<any>;
function renderToString(element: ReactElement<any>): Promise<{ html: string, modules: any, state: any }>;
function renderToStaticMarkup(element: ReactElement<any>): Promise<{ html: string, modules: any, state: any }>;
interface ServerStateProviderProps {
state?: any;
children?: ReactNode;
}
class ServerStateProvider<P extends ServerStateProviderProps, S> extends Component<P, S> {
}
}