@types/react-router
Advanced tools
Comparing version 2.0.39 to 2.0.40
@@ -50,5 +50,7 @@ // Type definitions for react-router v2.0.0 | ||
export type ParseQueryString = Router.ParseQueryString; | ||
export type LocationDescriptor = Router.LocationDescriptor; | ||
export type RedirectFunction = Router.RedirectFunction; | ||
export type RouteComponent = Router.RouteComponent; | ||
export type RouteComponentProps<P, R> = Router.RouteComponentProps<P, R>; | ||
export type RouteConfig = Router.RouteConfig; | ||
export type RouteHook = Router.RouteHook; | ||
@@ -55,0 +57,0 @@ export type StringifyQuery = Router.StringifyQuery; |
import * as React from 'react'; | ||
import Router from './Router'; | ||
import * as H from 'history'; | ||
@@ -15,5 +14,3 @@ declare const Link: Link; | ||
onlyActiveOnIndex?: boolean; | ||
to: Router.RoutePattern | H.LocationDescriptor; | ||
query?: H.Query; | ||
state?: H.LocationState; | ||
to: Router.RoutePattern | Router.LocationDescriptor | ((...args: any[]) => Router.LocationDescriptor); | ||
} | ||
@@ -20,0 +17,0 @@ |
@@ -5,4 +5,4 @@ import * as React from 'react'; | ||
QueryString, Query, | ||
Location, LocationDescriptor, LocationState, | ||
History, | ||
Location, LocationDescriptor, LocationState as HLocationState, | ||
History, Href, | ||
Pathname, Path } from 'history'; | ||
@@ -37,2 +37,8 @@ | ||
type LocationDescriptor = { | ||
pathname?: Pathname | ||
query?: Query | ||
hash?: Href | ||
state?: HLocationState | ||
} | ||
@@ -44,3 +50,3 @@ interface RedirectFunction { | ||
*/ | ||
(state: LocationState, pathname: Pathname | Path, query?: Query): void; | ||
(state: HLocationState, pathname: Pathname | Path, query?: Query): void; | ||
} | ||
@@ -93,3 +99,3 @@ | ||
setRouteLeaveHook(route: PlainRoute, hook?: RouteHook): () => void; | ||
isActive(pathOrLoc: LocationDescriptor, indexOnly?: boolean): boolean; | ||
isActive(pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean): boolean; | ||
} | ||
@@ -104,4 +110,4 @@ | ||
interface InjectedRouter { | ||
push: (pathOrLoc: History.LocationDescriptor) => void | ||
replace: (pathOrLoc: History.LocationDescriptor) => void | ||
push: (pathOrLoc: Path | LocationDescriptor) => void | ||
replace: (pathOrLoc: Path | LocationDescriptor) => void | ||
go: (n: number) => void | ||
@@ -113,4 +119,4 @@ goBack: () => void | ||
createHref(path: History.Path, query?: History.Query): History.Href | ||
isActive: (pathOrLoc: History.LocationDescriptor, indexOnly?: boolean) => boolean | ||
isActive: (pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean) => boolean | ||
} | ||
} |
{ | ||
"name": "@types/react-router", | ||
"version": "2.0.39", | ||
"description": "TypeScript definitions for react-router v2.0.0", | ||
"version": "2.0.40", | ||
"description": "TypeScript definitions for react-router", | ||
"license": "MIT", | ||
@@ -19,3 +19,3 @@ "author": "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>, Alex Wendland <https://github.com/awendland>, Kostya Esmukov <https://github.com/KostyaEsmukov>", | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "b8a3e469b66769544e77c04cb560b5ee975689bda16c2b88d2f6f427b2a9aa14" | ||
"typesPublisherContentHash": "c18a28bf03aab22204f412a70a4d28a5895f2406ef522fa6a5e3704c710a405a" | ||
} |
@@ -5,3 +5,3 @@ # Installation | ||
# Summary | ||
This package contains type definitions for react-router v2.0.0 (https://github.com/rackt/react-router). | ||
This package contains type definitions for react-router (https://github.com/rackt/react-router). | ||
@@ -12,3 +12,3 @@ # Details | ||
Additional Details | ||
* Last updated: Mon, 14 Nov 2016 19:35:01 GMT | ||
* Last updated: Mon, 28 Nov 2016 16:28:39 GMT | ||
* File structure: UMD | ||
@@ -15,0 +15,0 @@ * Library Dependencies: history |
@@ -13,3 +13,3 @@ { | ||
"libraryMinorVersion": 0, | ||
"libraryName": "react-router v2.0.0", | ||
"libraryName": "react-router", | ||
"typingsPackageName": "react-router", | ||
@@ -60,3 +60,3 @@ "projectName": "https://github.com/rackt/react-router", | ||
"hasPackageJson": false, | ||
"contentHash": "b8a3e469b66769544e77c04cb560b5ee975689bda16c2b88d2f6f427b2a9aa14" | ||
"contentHash": "c18a28bf03aab22204f412a70a4d28a5895f2406ef522fa6a5e3704c710a405a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20602
439