You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@types/react-router-redux

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-router-redux

TypeScript definitions for react-router-redux

5.0.27
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npmnpm
Version published
Weekly downloads
69K
12.38%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/react-router-redux

Summary

This package contains type definitions for react-router-redux (https://github.com/reactjs/react-router-redux).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-redux.

index.d.ts

import { History, Location, LocationDescriptor, LocationState, Path } from "history";
import * as React from "react";
import { match } from "react-router";
import { Action, Dispatch, Middleware, Reducer, Store } from "redux";

export interface ConnectedRouterProps<State> {
    children?: React.ReactNode;
    store?: Store<State> | undefined;
    history: History;
}
export class ConnectedRouter<State> extends React.Component<ConnectedRouterProps<State>> {}

export const LOCATION_CHANGE = "@@router/LOCATION_CHANGE";

export interface RouterState {
    location: Location | null;
}

export const routerReducer: Reducer<RouterState, Action>;

export const CALL_HISTORY_METHOD = "@@router/CALL_HISTORY_METHOD";

export function push(location: LocationDescriptor, state?: LocationState): RouterAction;
export function replace(location: LocationDescriptor, state?: LocationState): RouterAction;
export function go(n: number): RouterAction;
export function goBack(): RouterAction;
export function goForward(): RouterAction;

export const routerActions: {
    push: typeof push;
    replace: typeof replace;
    go: typeof go;
    goBack: typeof goBack;
    goForward: typeof goForward;
};

export interface LocationActionPayload {
    method: string;
    args?: any[] | undefined;
}

export interface RouterAction {
    type: typeof CALL_HISTORY_METHOD;
    payload: LocationActionPayload;
}

export interface LocationChangeAction {
    type: typeof LOCATION_CHANGE;
    payload: Location & {
        props?: {
            match: {
                path: string;
                url: string;
                params: any;
                isExact: boolean;
            };
            location: Location;
            history: History;
        } | undefined;
    };
}

export function routerMiddleware(history: History): Middleware;

export function createMatchSelector(path: string): (state: { router: RouterState }) => match | null;

Additional Details

Credits

These definitions were written by Huy Nguyen, Shoya Tanaka, and Mykolas.

FAQs

Package last updated on 02 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts