# @types/requestidlecallback

> TypeScript definitions for requestidlecallback

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

## Install

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

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

## Links

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

## Recent versions

- 0.3.7 (latest) — 2023-11-07
- 0.3.5 (ts4.4) — 2022-10-03
- 0.3.4 (ts4.0) — 2021-07-07
- 0.3.1 (ts3.0) — 2019-10-22
- 0.3.0 (ts2.1) — 2019-10-03
- 0.3.6 — 2023-10-18
- 0.3.3 — 2021-06-29
- 0.3.2 — 2021-06-28
- 0.1.2 — 2019-09-23
- 0.1.1 — 2019-02-13
- 0.1.0 — 2018-07-25

## README

# Installation
> `npm install --save @types/requestidlecallback`

# Summary
This package contains type definitions for requestidlecallback (https://w3c.github.io/requestidlecallback/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/requestidlecallback.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/requestidlecallback/index.d.ts)
````ts
/// <reference lib="dom" />

interface IdleDeadline {
    timeRemaining(): DOMHighResTimeStamp;
    readonly didTimeout: boolean;
}

interface IdleRequestOptions {
    timeout?: number | undefined;
}

type IdleCallbackHandle = number;

interface Window {
    requestIdleCallback(callback: (deadline: IdleDeadline) => void, options?: IdleRequestOptions): IdleCallbackHandle;
    cancelIdleCallback(handle: number): void;
}

declare function requestIdleCallback(callback: (deadline: IdleDeadline) => void, options?: IdleRequestOptions): number;
declare function cancelIdleCallback(handle: number): void;

declare function request(callback: (deadline: IdleDeadline) => void, options?: IdleRequestOptions): IdleCallbackHandle;
declare function cancel(handle: IdleCallbackHandle): void;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [贺师俊](https://github.com/hax), [Max Boguslavskiy](https://github.com/maxbogus), and [Teramoto Daiki](https://github.com/teramotodaiki).

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