mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-22 11:40:10 +08:00
Merge pull request #7885 from isman-usoh/react-router-2.0.0-rc5-patch-1
Rename RoutingContext -> RouterContext
This commit is contained in:
Vendored
+15
-10
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-router v1.0.0
|
||||
// Type definitions for react-router v2.0.0-rc5
|
||||
// Project: https://github.com/rackt/react-router
|
||||
// Definitions by: Sergey Buturlakin <http://github.com/sergey-buturlakin>, Yuichi Murata <https://github.com/mrk21>, Václav Ostrožlík <https://github.com/vasek17>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -110,17 +110,22 @@ declare namespace ReactRouter {
|
||||
const IndexLink: Link
|
||||
|
||||
|
||||
interface RoutingContextProps extends React.Props<RoutingContext> {
|
||||
history: H.History
|
||||
interface RouterContextProps extends React.Props<RouterContext> {
|
||||
history?: H.History
|
||||
router: Router
|
||||
createElement: (component: RouteComponent, props: Object) => any
|
||||
location: H.Location
|
||||
routes: RouteConfig
|
||||
params: Params
|
||||
components?: RouteComponent[]
|
||||
}
|
||||
interface RoutingContext extends React.ComponentClass<RoutingContextProps> {}
|
||||
interface RoutingContextElement extends React.ReactElement<RoutingContextProps> {}
|
||||
const RoutingContext: RoutingContext
|
||||
interface RouterContext extends React.ComponentClass<RouterContextProps> {}
|
||||
interface RouterContextElement extends React.ReactElement<RouterContextProps> {
|
||||
history?: H.History
|
||||
location: H.Location
|
||||
router?: Router
|
||||
}
|
||||
const RouterContext: RouterContext
|
||||
|
||||
|
||||
/* components (configuration) */
|
||||
@@ -335,9 +340,9 @@ declare module "react-router/lib/RouteUtils" {
|
||||
}
|
||||
|
||||
|
||||
declare module "react-router/lib/RoutingContext" {
|
||||
declare module "react-router/lib/RouterContext" {
|
||||
|
||||
export default ReactRouter.RoutingContext
|
||||
export default ReactRouter.RouterContext
|
||||
|
||||
}
|
||||
|
||||
@@ -418,7 +423,7 @@ declare module "react-router" {
|
||||
|
||||
import { formatPattern } from "react-router/lib/PatternUtils"
|
||||
|
||||
import RoutingContext from "react-router/lib/RoutingContext"
|
||||
import RouterContext from "react-router/lib/RouterContext"
|
||||
|
||||
import PropTypes from "react-router/lib/PropTypes"
|
||||
|
||||
@@ -459,7 +464,7 @@ declare module "react-router" {
|
||||
useRoutes,
|
||||
createRoutes,
|
||||
formatPattern,
|
||||
RoutingContext,
|
||||
RouterContext,
|
||||
PropTypes,
|
||||
match
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user