# @types/debounce-promise

> TypeScript definitions for debounce-promise

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

## Install

```sh
npm install @types/debounce-promise
pnpm add @types/debounce-promise
yarn add @types/debounce-promise
bun add @types/debounce-promise
```

## 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.1.9 |
| Published | 2023-11-07 |
| First published | 2018-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

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

## Recent versions

- 3.1.9 (latest) — 2023-11-07
- 3.1.6 (ts4.2) — 2022-12-13
- 3.1.5 (ts4.1) — 2022-10-26
- 3.1.4 (ts3.6) — 2021-07-06
- 3.1.3 (ts3.1) — 2020-08-21
- 3.1.2 (ts3.0) — 2020-05-15
- 3.1.8 — 2023-10-18
- 3.1.7 — 2023-09-22
- 3.1.1 — 2018-12-21
- 3.1.0 — 2018-12-07

## README

# Installation
> `npm install --save @types/debounce-promise`

# Summary
This package contains type definitions for debounce-promise (https://github.com/bjoerge/debounce-promise).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debounce-promise.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debounce-promise/index.d.ts)
````ts
declare namespace debounce {
    interface DebounceOptions {
        leading?: boolean | undefined;
        accumulate?: boolean | undefined;
    }
}

// func is called with an array of array of parameters if accumulate is true
// Use Array<[arg0, arg1, ..., argN]> as func's first parameter type for correct hints
declare function debounce<T extends any[], R>(
    func: (args: Array<[...T]>) => R,
    wait?: number,
    options?: debounce.DebounceOptions & { accumulate: true },
): (
    ...args: T
) => R extends Promise<any> ? R
    : Promise<R>;

declare function debounce<T extends (...args: any[]) => any>(
    func: T,
    wait?: number | (() => number),
    options?: debounce.DebounceOptions,
): (
    ...args: Parameters<T>
) => ReturnType<T> extends Promise<any> ? ReturnType<T>
    : Promise<ReturnType<T>>;

export = debounce;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
 * Dependencies: none

# Credits
These definitions were written by [Wu Haotian](https://github.com/whtsky), and [Trevor Robinson](https://github.com/tprobinson).

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