1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | type InputFunction = (...args: any[]) => any;
|
9 |
|
10 | declare function pify(input: InputFunction, options?: pify.PifyOptions): (...args: any[]) => Promise<any>;
|
11 | declare function pify(input: object, options?: pify.PifyOptions): any;
|
12 |
|
13 | declare namespace pify {
|
14 | interface PifyOptions {
|
15 | multiArgs?: boolean | undefined;
|
16 | include?: Array<string | RegExp> | undefined;
|
17 | exclude?: Array<string | RegExp> | undefined;
|
18 | excludeMain?: boolean | undefined;
|
19 | errorFirst?: boolean | undefined;
|
20 | promiseModule?: PromiseModule | undefined;
|
21 | }
|
22 |
|
23 | interface PromiseModule {
|
24 | new (executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void): any;
|
25 | }
|
26 | }
|
27 |
|
28 | export = pify;
|