npm.io
7.0.3 • Published 2 years ago

@types/npm-packlist

Licence
MIT
Version
7.0.3
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/npm-packlist

Summary

This package contains type definitions for npm-packlist (https://github.com/npm/npm-packlist).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/npm-packlist.

index.d.ts

import type { Node } from "@npmcli/arborist";
import type { Walker, WalkerOptions, WalkerSync } from "ignore-walk";

declare function packlist(tree: Node, options?: packlist.Options): Promise<string[]>;
declare function packlist<T>(
    tree: Node,
    options: packlist.Options | undefined,
    callback: (result: string[]) => T,
): Promise<T>;

declare namespace packlist {
    interface Options extends WalkerOptions {
        parent?: Walker | WalkerSync | null | undefined;
        /** Directory to walk recusively. Defaults to `process.cwd()`. */
        path?: string | undefined;
    }
}

export = packlist;

Additional Details

Credits

These definitions were written by Klaus Meinhardt, and Florian Imdahl.