Debian Codegraph @

types-promise-inflight/README.md

raw symbols SCIP
1 # Installation
2 > `npm install --save @types/promise-inflight`
3
4 # Summary
5 This package contains type definitions for promise-inflight (https://github.com/iarna/promise-inflight#readme).
6
7 # Details
8 Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise-inflight.
9 ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise-inflight/index.d.ts)
10 ````ts
11 export = inflight;
12
13 type Resolvable<T> = PromiseLike<T> | T;
14 /**
15 * @param unique A globally-unique key that is used to identify the call to this
16 * function. It determines how to cache the inlfight request. eg. a url or
17 * filename or whatever.
18 * @param doFly The function that actually carries out the request, eg. fetches
19 * the url or whatever.
20 * @returns One promise as long as the `doFly()` promise is pending. Note that
21 * if `bluebird` is installed, this promise will be a Bluebird promise.
22 */
23 declare function inflight<T>(
24 unique: Resolvable<string> | Resolvable<ReadonlyArray<Resolvable<string>>>,
25 doFly: () => Resolvable<T>,
26 ): Promise<T>;
27
28 declare namespace inflight {
29 const active: {
30 [key: string]: Promise<any>;
31 };
32 }
33
34 ````
35
36 ### Additional Details
37 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
38 * Dependencies: none
39
40 # Credits
41 These definitions were written by [Emily Marigold Klassen](https://github.com/forivall).