# @types/read-package-tree

> TypeScript definitions for read-package-tree

Latest version **5.2.4** (published 2023-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/read-package-tree
pnpm add @types/read-package-tree
yarn add @types/read-package-tree
bun add @types/read-package-tree
```

## Health

**Score 45/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.2.4 |
| Published | 2023-11-22 |
| First published | 2017-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51448 |
| Maintainers | types |

## Links

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

## Recent versions

- 5.2.4 (latest) — 2023-11-22
- 5.2.0 (ts2.0) — 2018-05-15
- 5.2.3 — 2023-11-07
- 5.2.2 — 2023-10-18
- 5.2.1 — 2023-09-27
- 5.1.0 — 2017-08-09

## README

# Installation
> `npm install --save @types/read-package-tree`

# Summary
This package contains type definitions for read-package-tree (https://github.com/npm/read-package-tree).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/read-package-tree.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/read-package-tree/index.d.ts)
````ts
declare function rpt(root: string, cb: (er: Error | null, data: rpt.Node) => void): void;
declare function rpt(
    root: string,
    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
    filterWith: (node: rpt.Node, kidName: string) => void | undefined | boolean,
    cb: (er: Error | null, data: rpt.Node) => void,
): void;

declare namespace rpt {
    class Node {
        id: number;
        name: string;
        package: any;
        children: Node[];
        parent: Node | null;
        path: string;
        realpath: string;
        error: Error | null;
        isLink: boolean;
        constructor(
            pkg: any,
            logical: string,
            physical: string,
            er: Error | null,
            cache: { [physical: string]: Node },
            fromLink?: boolean,
        );
    }

    class Link extends Node {
        isLink: true;
        target: Node;
        constructor(
            pkg: any,
            logical: string,
            physical: string,
            realpath: string,
            er: Error | null,
            cache: { [physical: string]: Node },
        );
    }
}

export = rpt;

````

### Additional Details
 * Last updated: Wed, 22 Nov 2023 00:24:48 GMT
 * Dependencies: none

# Credits
These definitions were written by [Melvin Groenhoff](https://github.com/mgroenhoff).

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