Socket
Book a DemoInstallSign in
Socket

@types/redux-first-routing

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/redux-first-routing

TypeScript definitions for redux-first-routing

0.3.4
ts4.5
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
ts6.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/redux-first-routing

Summary

This package contains type definitions for redux-first-routing (https://github.com/mksarge/redux-first-routing).

Details

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

index.d.ts

import { Hash, History, LocationDescriptorObject, Path, Pathname, Search } from "history";
import createBrowserHistory from "history/createBrowserHistory";
import { Action, Middleware, Reducer, Store } from "redux";

export { createBrowserHistory };

export function startListener(history: History, store: Store): void;

// constants
export const PUSH: "ROUTER/PUSH";
export const REPLACE: "ROUTER/REPLACE";
export const GO: "ROUTER/GO";
export const GO_BACK: "ROUTER/GO_BACK";
export const GO_FORWARD: "ROUTER/GO_FORWARD";
export const LOCATION_CHANGE: "ROUTER/LOCATION_CHANGE";

// actions
export interface pushAction<T extends Path | LocationDescriptorObject> extends Action<typeof PUSH> {
    payload: T;
}
export function push<T extends Path | LocationDescriptorObject>(href: T): pushAction<T>;

export interface replaceAction<T extends Path | LocationDescriptorObject> extends Action<typeof REPLACE> {
    payload: T;
}
export function replace<T extends Path | LocationDescriptorObject>(href: T): replaceAction<T>;

export interface goAction<T extends number> extends Action<typeof GO> {
    payload: T;
}
export function go<T extends number>(index: T): goAction<T>;

export type goBackAction = Action<typeof GO_BACK>;
export function goBack(): goBackAction;

export type goForwardAction = Action<typeof GO_FORWARD>;
export function goForward(): goForwardAction;

export interface locationChangeAction<P extends Pathname, S extends Search, H extends Hash>
    extends Action<typeof LOCATION_CHANGE>
{
    payload: {
        pathname: P;
        search: S;
        queries: any;
        hash: H;
    };
}
export function locationChange<P extends Pathname, S extends Search, H extends Hash>(
    _: { pathname: P; search: S; hash: H },
): locationChangeAction<P, S, H>;

export interface State {
    pathname: Pathname;
    search: Search;
    queries: any;
    hash: Hash;
}

export const routerReducer: Reducer<State>;

export function routerMiddleware(history: History): Middleware<any, State>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/history, redux

Credits

These definitions were written by Tomek Łaziuk.

FAQs

Package last updated on 07 Nov 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.