0.4.3 • Published 6 months ago

@types/pkginfo v0.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/pkginfo

Summary

This package contains type definitions for pkginfo (https://github.com/indexzero/node-pkginfo).

Details

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

index.d.ts

// Type definitions for pkginfo 0.4
// Project: https://github.com/indexzero/node-pkginfo
// Definitions by: David Tanner <https://github.com/DavidTanner>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

declare namespace PkgInfo {
    interface Options {
        dir?: string;
        include: string[];
    }

    interface FindResults {
        dir?: string;
        package: Record<string, any>;
    }

    interface PkgInfo {
        (pmodule: NodeModule, options?: Options | string[] | string, ...properties: string[]): PkgInfo;

        //
        // ### function find (dir)
        // #### @pmodule {Module} Parent module to read from.
        // #### @dir {string} **Optional** Directory to start search from.
        // Searches up the directory tree from `dir` until it finds a directory
        // which contains a `package.json` file.
        //
        read(
          pmodule: NodeModule,
          dir?: string
        ): FindResults;

        find(
          pmodule: NodeModule,
          dir?: string
        ): Record<string, any>;
    }
}

declare const pkgInfo: PkgInfo.PkgInfo & { version: string; };

export = pkgInfo;

Additional Details

  • Last updated: Tue, 26 Oct 2021 21:31:22 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by David Tanner.

0.4.1

8 months ago

0.4.3

6 months ago

0.4.2

7 months ago

0.4.0

3 years ago