# @types/promise-inflight

> TypeScript definitions for promise-inflight

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

## Install

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

## 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 | 1.0.3 |
| Published | 2023-11-07 |
| First published | 2020-02-20 |
| 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 | 51443 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.0.3 (latest) — 2023-11-07
- 1.0.0 (ts2.8) — 2020-02-20
- 1.0.2 — 2023-10-18
- 1.0.1 — 2023-09-24

## README

# Installation
> `npm install --save @types/promise-inflight`

# Summary
This package contains type definitions for promise-inflight (https://github.com/iarna/promise-inflight#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise-inflight.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise-inflight/index.d.ts)
````ts
export = inflight;

type Resolvable<T> = PromiseLike<T> | T;
/**
 * @param unique A globally-unique key that is used to identify the call to this
 * function. It determines how to cache the inlfight request. eg. a url or
 * filename or whatever.
 * @param doFly The function that actually carries out the request, eg. fetches
 * the url or whatever.
 * @returns One promise as long as the `doFly()` promise is pending. Note that
 * if `bluebird` is installed, this promise will be a Bluebird promise.
 */
declare function inflight<T>(
    unique: Resolvable<string> | Resolvable<ReadonlyArray<Resolvable<string>>>,
    doFly: () => Resolvable<T>,
): Promise<T>;

declare namespace inflight {
    const active: {
        [key: string]: Promise<any>;
    };
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Emily Marigold Klassen](https://github.com/forivall).

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