@types/pify
TypeScript icon, indicating that this package has built-in type declarations

5.0.4 • Public • Published

Installation

npm install --save @types/pify

Summary

This package contains type definitions for pify (https://github.com/sindresorhus/pify).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pify.

index.d.ts

type InputFunction = (...args: any[]) => any;

declare function pify(input: InputFunction, options?: pify.PifyOptions): (...args: any[]) => Promise<any>;
declare function pify(input: object, options?: pify.PifyOptions): any;

declare namespace pify {
    interface PifyOptions {
        multiArgs?: boolean | undefined;
        include?: Array<string | RegExp> | undefined;
        exclude?: Array<string | RegExp> | undefined;
        excludeMain?: boolean | undefined;
        errorFirst?: boolean | undefined;
        promiseModule?: PromiseModule | undefined;
    }

    interface PromiseModule {
        new(executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void): any;
    }
}

export = pify;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Sam Verschueren, Michael Müller, and Christoph Müller.

/@types/pify/

    Package Sidebar

    Install

    npm i @types/pify

    Weekly Downloads

    39,289

    Version

    5.0.4

    License

    MIT

    Unpacked Size

    4.37 kB

    Total Files

    5

    Last publish

    Collaborators

    • types