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 definitions for pify 5.0
|
12 | // Project: https://github.com/sindresorhus/pify
|
13 | // Definitions by: Sam Verschueren <https://github.com/samverschueren>
|
14 | // Michael Müller <https://github.com/mad-mike>
|
15 | // Christoph Müller <https://github.com/c7hm4r>
|
16 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
17 |
|
18 | type InputFunction = (...args: any[]) => any;
|
19 |
|
20 | declare function pify(input: InputFunction, options?: pify.PifyOptions): (...args: any[]) => Promise<any>;
|
21 | declare function pify(input: object, options?: pify.PifyOptions): any;
|
22 |
|
23 | declare namespace pify {
|
24 | interface PifyOptions {
|
25 | multiArgs?: boolean | undefined;
|
26 | include?: Array<string | RegExp> | undefined;
|
27 | exclude?: Array<string | RegExp> | undefined;
|
28 | excludeMain?: boolean | undefined;
|
29 | errorFirst?: boolean | undefined;
|
30 | promiseModule?: PromiseModule | undefined;
|
31 | }
|
32 |
|
33 | interface PromiseModule {
|
34 | new (executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void): any;
|
35 | }
|
36 | }
|
37 |
|
38 | export = pify;
|
39 |
|
40 | ````
|
41 |
|
42 | ### Additional Details
|
43 | * Last updated: Wed, 07 Jul 2021 17:02:29 GMT
|
44 | * Dependencies: none
|
45 | * Global values: none
|
46 |
|
47 | # Credits
|
48 | 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).
|
49 |
|
\ | No newline at end of file |