Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 4.0.57
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
49K
decreased by-2.45%
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/rackt/react-router-redux).

Details

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

index.d.ts

import { History, Location, LocationDescriptor } from "history";
import { Action, Middleware, Store } from "redux";

export const CALL_HISTORY_METHOD: string;
export const LOCATION_CHANGE: string;

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

export interface RouterAction extends Action {
    payload?: LocationActionPayload | undefined;
}

export type LocationAction = (nextLocation: LocationDescriptor) => RouterAction;
export type GoAction = (n: number) => RouterAction;
export type NavigateAction = () => RouterAction;

export const push: LocationAction;
export const replace: LocationAction;
export const go: GoAction;
export const goBack: NavigateAction;
export const goForward: NavigateAction;

export interface RouteActions {
    push: typeof push;
    replace: typeof replace;
    go: typeof go;
    goForward: typeof goForward;
    goBack: typeof goBack;
}

export const routerActions: RouteActions;

export interface RouterState {
    locationBeforeTransitions: Location;
}

export type DefaultSelectLocationState = (state: any) => RouterState;

export interface SyncHistoryWithStoreOptions {
    selectLocationState?: DefaultSelectLocationState | undefined;
    adjustUrlOnReplay?: boolean | undefined;
}

export interface HistoryUnsubscribe {
    unsubscribe(): void;
}

export function routerReducer(state?: RouterState, action?: Action): RouterState;
export function syncHistoryWithStore(
    history: History,
    store: Store<any>,
    options?: SyncHistoryWithStoreOptions,
): History & HistoryUnsubscribe;
export function routerMiddleware(history: History): Middleware;

Additional Details

  • Last updated: Wed, 18 Oct 2023 11:45:06 GMT
  • Dependencies: @types/history, redux

Credits

These definitions were written by Isman Usoh, Noah Shipley, Karol Janyst, and Dovydas Navickas.

FAQs

Package last updated on 18 Oct 2023

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

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