mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-12 12:10:44 +08:00
Fix Router#run() to be enabled to call with ReactElement created by React.createFactory()
ref. #4267
This commit is contained in:
Vendored
+3
-3
@@ -179,7 +179,7 @@ declare module ReactRouter {
|
||||
}
|
||||
|
||||
interface RouterCreateOption {
|
||||
routes: Route;
|
||||
routes: React.ReactElement<RouteProp>;
|
||||
location?: LocationBase;
|
||||
scrollBehavior?: ScrollBehaviorBase;
|
||||
}
|
||||
@@ -187,8 +187,8 @@ declare module ReactRouter {
|
||||
type RouterRunCallback = (Handler: Router, state: RouterState) => void;
|
||||
|
||||
function create(options: RouterCreateOption): Router;
|
||||
function run(routes: Route, callback: RouterRunCallback): Router;
|
||||
function run(routes: Route, location: LocationBase, callback: RouterRunCallback): Router;
|
||||
function run(routes: React.ReactElement<RouteProp>, callback: RouterRunCallback): Router;
|
||||
function run(routes: React.ReactElement<RouteProp>, location: LocationBase, callback: RouterRunCallback): Router;
|
||||
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user