Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@types/react-router

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-router - npm Package Compare versions

Comparing version 2.0.44 to 2.0.45

6

react-router/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for react-router v2.0.0
// Type definitions for react-router 2.0
// Project: https://github.com/rackt/react-router

@@ -12,5 +12,5 @@ // 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>, Alex Wendland <https://github.com/awendland>, Kostya Esmukov <https://github.com/KostyaEsmukov>

export const routerShape: React.Requireable<any>
export const routerShape: React.Requireable<any>;
export const locationShape: React.Requireable<any>
export const locationShape: React.Requireable<any>;

@@ -17,0 +17,0 @@ import Router from "./lib/Router";

@@ -15,4 +15,4 @@ import * as React from 'react';

components?: Router.RouteComponents;
getComponent?: (nextState: Router.RouterState, cb: (error: any, component?: Router.RouteComponent) => void) => void
getComponents?: (nextState: Router.RouterState, cb: (error: any, components?: Router.RouteComponents) => void) => void
getComponent?: (nextState: Router.RouterState, cb: (error: any, component?: Router.RouteComponent) => void) => void;
getComponents?: (nextState: Router.RouterState, cb: (error: any, components?: Router.RouteComponents) => void) => void;
onEnter?: Router.EnterHook;

@@ -19,0 +19,0 @@ onLeave?: Router.LeaveHook;

import * as React from 'react';
declare const RouteContext: React.Mixin<any, any>
declare const RouteContext: React.Mixin<any, any>;
export default RouteContext;

@@ -19,3 +19,3 @@ import * as React from 'react';

type RoutePattern = string;
type RouteComponents = { [key: string]: RouteComponent };
interface RouteComponents { [key: string]: RouteComponent; }

@@ -33,11 +33,11 @@ type ParseQueryString = (queryString: QueryString) => Query;

type Params = { [param: string]: string };
interface Params { [param: string]: string; }
type RouterListener = (error: Error, nextState: RouterState) => void;
type LocationDescriptor = {
pathname?: Pathname
query?: Query
hash?: Href
state?: HLocationState
interface LocationDescriptor {
pathname?: Pathname;
query?: Query;
hash?: Href;
state?: HLocationState;
}

@@ -108,12 +108,12 @@

interface InjectedRouter {
push: (pathOrLoc: Path | LocationDescriptor) => void
replace: (pathOrLoc: Path | LocationDescriptor) => void
go: (n: number) => void
goBack: () => void
goForward: () => void
setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void
createPath(path: History.Path, query?: History.Query): History.Path
createHref(path: History.Path, query?: History.Query): History.Href
isActive: (pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean) => boolean
push: (pathOrLoc: Path | LocationDescriptor) => void;
replace: (pathOrLoc: Path | LocationDescriptor) => void;
go: (n: number) => void;
goBack: () => void;
goForward: () => void;
setRouteLeaveHook(route: PlainRoute, callback: RouteHook): void;
createPath(path: History.Path, query?: History.Query): History.Path;
createHref(path: History.Path, query?: History.Query): History.Href;
isActive: (pathOrLoc: Path | LocationDescriptor, indexOnly?: boolean) => boolean;
}
}

@@ -7,7 +7,7 @@ import Router from './Router';

export interface HistoryRoutes {
listen(listener: Router.RouterListener): Function
listenBeforeLeavingRoute(route: Router.PlainRoute, hook: Router.RouteHook): void
match(location: H.Location, callback: (error: any, nextState: Router.RouterState, nextLocation: H.Location) => void): void
isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean
setRouteLeaveHook(route: Router.PlainRoute, callback: Router.RouteHook): void
listen(listener: Router.RouterListener): Function;
listenBeforeLeavingRoute(route: Router.PlainRoute, hook: Router.RouteHook): void;
match(location: H.Location, callback: (error: any, nextState: Router.RouterState, nextLocation: H.Location) => void): void;
isActive(pathname: H.Pathname, query?: H.Query, indexOnly?: boolean): boolean;
setRouteLeaveHook(route: Router.PlainRoute, callback: Router.RouteHook): void;
}

@@ -14,0 +14,0 @@

import { History, HistoryOptions, HistoryQueries, CreateHistory } from 'history';
interface CreateRouterHistory {
(options?: HistoryOptions): History & HistoryQueries;
}
export default function useRouterHistory<T>(createHistory: CreateHistory<T>): CreateRouterHistory;
export default function useRouterHistory<T>(createHistory: CreateHistory<T>): (options?: HistoryOptions) => History & HistoryQueries;
import * as React from 'react';
declare function withRouter<C extends React.ComponentClass<any> | React.StatelessComponent<any> | React.PureComponent<any, any>>(component: C): C
declare function withRouter<C extends React.ComponentClass<any> | React.StatelessComponent<any> | React.PureComponent<any, any>>(component: C): C;
export default withRouter;
{
"name": "@types/react-router",
"version": "2.0.44",
"version": "2.0.45",
"description": "TypeScript definitions for react-router",

@@ -14,8 +14,8 @@ "license": "MIT",

"dependencies": {
"@types/react": "*",
"@types/history": "*"
"@types/history": "^2",
"@types/react": "*"
},
"peerDependencies": {},
"typesPublisherContentHash": "66848dc678b1a87a6e5bdcfd6a721ffd591e817c66523ebcdae1f7a75e696a5a",
"typesPublisherContentHash": "88a78523a007e63ba73d062fdab2f42de0d6e14fd47d079fcc5ce581a208fd83",
"typeScriptVersion": "2.0"
}

@@ -11,4 +11,4 @@ # Installation

Additional Details
* Last updated: Thu, 12 Jan 2017 17:53:51 GMT
* Dependencies: react, history
* Last updated: Tue, 17 Jan 2017 16:58:54 GMT
* Dependencies: history, react
* Global values: ReactRouter

@@ -15,0 +15,0 @@

@@ -8,6 +8,8 @@ {

"dependencies": {
"react": "*",
"history": "*"
"history": 2,
"react": "*"
},
"pathMappings": {},
"pathMappings": {
"history": 2
},
"libraryMajorVersion": 2,

@@ -25,23 +27,23 @@ "libraryMinorVersion": 0,

"react-router/.",
"react-router/lib/Router",
"react-router/lib/IndexLink",
"react-router/lib/Link",
"react-router/lib/IndexRoute",
"react-router/lib/IndexRedirect",
"react-router/lib/IndexLink",
"react-router/lib/routerHistory",
"react-router/lib/Redirect",
"react-router/lib/Route",
"react-router/lib/Router",
"react-router/lib/RouteContext",
"react-router/lib/Redirect",
"react-router/lib/routerHistory",
"react-router/lib/IndexRoute",
"react-router/lib/Lifecycle",
"react-router/lib/hashHistory",
"react-router/lib/browserHistory",
"react-router/lib/RouterContext",
"react-router/lib/Lifecycle",
"react-router/lib/RouteContext",
"react-router/lib/useRoutes",
"react-router/lib/PatternUtils",
"react-router/lib/RouteUtils",
"react-router/lib/RouterContext",
"react-router/lib/PropTypes",
"react-router/lib/useRouterHistory",
"react-router/lib/match",
"react-router/lib/useRouterHistory",
"react-router/lib/withRouter",
"react-router/lib/createMemoryHistory",
"react-router/lib/RouteUtils",
"react-router/lib/applyRouterMiddleware"

@@ -75,5 +77,5 @@ ],

"hasPackageJson": false,
"contentHash": "66848dc678b1a87a6e5bdcfd6a721ffd591e817c66523ebcdae1f7a75e696a5a"
"contentHash": "88a78523a007e63ba73d062fdab2f42de0d6e14fd47d079fcc5ce581a208fd83"
},
"isLatest": true
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc