mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Working React+Redux template
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Type definitions for react-router v2.0.0-rc5
|
||||
// Type definitions for react-router v2.0.0
|
||||
// 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 by: Sergey Buturlakin <https://github.com/sergey-buturlakin>, Yuichi Murata <https://github.com/mrk21>, Václav Ostrožlík <https://github.com/vasek17>, Nathan Brown <https://github.com/ngbrown>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
@@ -195,6 +195,10 @@ declare namespace ReactRouter {
|
||||
interface IndexRedirectElement extends React.ReactElement<IndexRedirectProps> {}
|
||||
const IndexRedirect: IndexRedirect
|
||||
|
||||
interface RouterOnContext extends H.History {
|
||||
setRouteLeaveHook(route: PlainRoute, hook?: RouteHook): () => void;
|
||||
isActive(pathOrLoc: H.LocationDescriptor, indexOnly?: boolean): boolean;
|
||||
}
|
||||
|
||||
/* mixins */
|
||||
|
||||
@@ -220,6 +224,7 @@ declare namespace ReactRouter {
|
||||
listenBeforeLeavingRoute(route: PlainRoute, hook: RouteHook): void
|
||||
match(location: H.Location, callback: (error: any, nextState: RouterState, nextLocation: H.Location) => void): void
|
||||
isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean
|
||||
setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void
|
||||
}
|
||||
|
||||
function useRoutes<T>(createHistory: HistoryModule.CreateHistory<T>): HistoryModule.CreateHistory<T & HistoryRoutes>
|
||||
@@ -447,6 +452,7 @@ declare module "react-router" {
|
||||
export type RouterListener = ReactRouter.RouterListener
|
||||
export type RouterState = ReactRouter.RouterState
|
||||
export type HistoryBase = ReactRouter.HistoryBase
|
||||
export type RouterOnContext = ReactRouter.RouterOnContext
|
||||
|
||||
export {
|
||||
Router,
|
||||
|
||||
Reference in New Issue
Block a user