-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c47093
commit 40442fa
Showing
4 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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>; | ||
|
||
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> { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters