UNPKG

1.22 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/commondir`
3
4# Summary
5This package contains type definitions for commondir (https://github.com/substack/node-commondir).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/commondir.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/commondir/index.d.ts)
10````ts
11export = commondir;
12
13/**
14 * Compute the closest common parent directory for an array absolutePaths.
15 *
16 * @see \`{@link https://github.com/substack/node-commondir#commondirabsolutepaths }\`
17 */
18declare function commondir(basedir: string, relativePaths: string[]): string;
19/**
20 * Compute the closest common parent directory for an array relativePaths which will be resolved for each dir in
21 * relativePaths according to: path.resolve(basedir, dir).
22 *
23 * @see \`{@link https://github.com/substack/node-commondir#commondirbasedir-relativepaths }\`
24 */
25declare function commondir(absolutePaths: string[]): string;
26
27````
28
29### Additional Details
30 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
31 * Dependencies: none
32
33# Credits
34These definitions were written by [Leonard Thieu](https://github.com/leonard-thieu).
35
\No newline at end of file