# @types/pkginfo

> TypeScript definitions for pkginfo

Latest version **0.4.4** (published 2025-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pkginfo
pnpm add @types/pkginfo
yarn add @types/pkginfo
bun add @types/pkginfo
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.4 |
| Published | 2025-11-14 |
| First published | 2021-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51443 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pkginfo
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pkginfo
- npm.io page: https://npm.io/package/@types/pkginfo

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.4.4 (latest) — 2025-11-14
- 0.4.3 (ts4.5) — 2023-11-07
- 0.4.0 (ts3.7) — 2021-10-26
- 0.4.2 — 2023-10-18
- 0.4.1 — 2023-09-24

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pkginfo/index.d.ts)
````ts
/// <reference types="node" />

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

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

    interface PkgInfo {
        (pmodule: NodeJS.Module, 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: NodeJS.Module,
            dir?: string,
        ): FindResults;

        find(
            pmodule: NodeJS.Module,
            dir?: string,
        ): Record<string, any>;
    }
}

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

export = pkgInfo;

````

### Additional Details
 * Last updated: Fri, 14 Nov 2025 18:02:08 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [David Tanner](https://github.com/DavidTanner).

---
_Source: https://npm.io/package/@types/pkginfo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
