# @types/scroll

> TypeScript definitions for scroll

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

## Install

```sh
npm install @types/scroll
pnpm add @types/scroll
yarn add @types/scroll
bun add @types/scroll
```

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2023-11-07 |
| First published | 2019-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

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

## Recent versions

- 3.0.3 (latest) — 2023-11-07
- 3.0.1 (ts3.6) — 2021-07-06
- 3.0.0 (ts2.0) — 2019-08-19
- 3.0.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/scroll`

# Summary
This package contains type definitions for scroll (https://github.com/michaelrhodes/scroll).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scroll.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scroll/index.d.ts)
````ts
type ScrollError = Error | null;

interface ScrollOptions {
    /**
     * Ease function
     * @default easeInOut
     */
    ease?: ((time: number) => number) | undefined;
    /**
     * Animation duration
     * @default 350
     */
    duration?: number | undefined;
}

interface ScrollCallback {
    (error: ScrollError, value: number): void;
}

interface Cancel {
    (): void;
}

interface Scroll {
    /**
     * @param el Element to scroll
     * @param to Scroll to value
     * @param opts Additional options
     * @param cb Callback function to call after
     * @return Function to stop scrolling
     */
    (el: HTMLElement, to: number, opts?: ScrollOptions | ScrollCallback, cb?: ScrollCallback): Cancel;
}

declare const scroll: {
    left: Scroll;
    top: Scroll;
};

export = scroll;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Roman Charugin](https://github.com/romic).

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