1 | # Installation
|
2 | > `npm install --save @types/pify`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for pify (https://github.com/sindresorhus/pify).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pify.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pify/index.d.ts)
|
10 | ````ts
|
11 | type InputFunction = (...args: any[]) => any;
|
12 |
|
13 | declare function pify(input: InputFunction, options?: pify.PifyOptions): (...args: any[]) => Promise<any>;
|
14 | declare function pify(input: object, options?: pify.PifyOptions): any;
|
15 |
|
16 | declare namespace pify {
|
17 | interface PifyOptions {
|
18 | multiArgs?: boolean | undefined;
|
19 | include?: Array<string | RegExp> | undefined;
|
20 | exclude?: Array<string | RegExp> | undefined;
|
21 | excludeMain?: boolean | undefined;
|
22 | errorFirst?: boolean | undefined;
|
23 | promiseModule?: PromiseModule | undefined;
|
24 | }
|
25 |
|
26 | interface PromiseModule {
|
27 | new(executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void): any;
|
28 | }
|
29 | }
|
30 |
|
31 | export = pify;
|
32 |
|
33 | ````
|
34 |
|
35 | ### Additional Details
|
36 | * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
37 | * Dependencies: none
|
38 |
|
39 | # Credits
|
40 | These definitions were written by [Sam Verschueren](https://github.com/samverschueren), [Michael Müller](https://github.com/mad-mike), and [Christoph Müller](https://github.com/c7hm4r).
|
41 |
|
\ | No newline at end of file |