# @types/redux-first-routing

> TypeScript definitions for redux-first-routing

Latest version **0.3.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/redux-first-routing
pnpm add @types/redux-first-routing
yarn add @types/redux-first-routing
bun add @types/redux-first-routing
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2023-11-07 |
| First published | 2018-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/redux-first-routing
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-first-routing
- npm.io page: https://npm.io/package/@types/redux-first-routing

## Dependencies (2)

- [redux](https://npm.io/package/redux.md) ^4.0.0
- [@types/history](https://npm.io/package/@types/history.md) ^4.7.11

## Recent versions

- 0.3.4 (latest) — 2023-11-07
- 0.3.1 (ts3.8) — 2022-01-18
- 0.3.0 (ts2.3) — 2018-06-20
- 0.3.3 — 2023-10-18
- 0.3.2 — 2023-09-27

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-first-routing/index.d.ts)
````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](https://npmjs.com/package/@types/history), [redux](https://npmjs.com/package/redux)

# Credits
These definitions were written by [Tomek Łaziuk](https://github.com/tlaziuk).

---
_Source: https://npm.io/package/@types/redux-first-routing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
