# @types/redux-first-router-restore-scroll

> TypeScript definitions for redux-first-router-restore-scroll

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

## Install

```sh
npm install @types/redux-first-router-restore-scroll
pnpm add @types/redux-first-router-restore-scroll
yarn add @types/redux-first-router-restore-scroll
bun add @types/redux-first-router-restore-scroll
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2023-11-07 |
| First published | 2018-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 1.2.6 (latest) — 2023-11-07
- 1.2.3 (ts3.8) — 2022-01-18
- 1.2.2 (ts3.6) — 2021-07-08
- 1.2.1 (ts2.8) — 2019-07-30
- 1.2.0 (ts2.4) — 2018-04-30
- 1.2.5 — 2023-10-18
- 1.2.4 — 2023-09-27

## README

# Installation
> `npm install --save @types/redux-first-router-restore-scroll`

# Summary
This package contains type definitions for redux-first-router-restore-scroll (https://github.com/faceyspacey/redux-first-router-restore-scroll#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-first-router-restore-scroll.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-first-router-restore-scroll/index.d.ts)
````ts
import { History, Location } from "history";
import { LocationState } from "redux-first-router";

/**
 * This package provides complete scroll restoration for redux-first-router
 * through the call of a single function. It also insures hash changes work as
 * you would expect (e.g. like when you click #links to different section of a
 * Github readme it automatically scrolls, and allows you to use the browser
 * back/next buttons to move between sections you've visited).
 *
 * @example
 * import restoreScroll from 'redux-first-router-restore-scroll'
 * connectRoutes(history, routesMap, { restoreScroll: restoreScroll() })
 */
export default function restoreScroll(options?: {
    /** @default false */
    manual?: boolean | undefined;
    /** Use to implement custom scroll positioning. */
    shouldUpdateScroll?(prev: LocationState, locationState: LocationState): boolean | "profile-box" | [number, number];
    /**
     * To implement a custom backend storage for scroll state, pass a custom
     * stateStorage object. The object should implement the methods as described
     * by the package `scroll-behavior` as well as a function called setPrevKey
     * that keeps track of the previous key.
     */
    stateStorage?: {
        setPrevKey(key: string | null): void;
        read(location: Location, key: string | null): Location;
        save(location: Location, key: string | null, value: any): void;
    } | undefined;
}): (history: History) => object;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/history](https://npmjs.com/package/@types/history), [@types/redux-first-router](https://npmjs.com/package/@types/redux-first-router)

# Credits
These definitions were written by [icopp](https://github.com/icopp).

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