1 | // Type definitions for commondir 1.0
|
2 | // Project: https://github.com/substack/node-commondir
|
3 | // Definitions by: Leonard Thieu <https://github.com/leonard-thieu>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 | export = commondir;
|
7 |
|
8 | /**
|
9 | * Compute the closest common parent directory for an array absolutePaths.
|
10 | *
|
11 | * @see \`{@link https://github.com/substack/node-commondir#commondirabsolutepaths }\`
|
12 | */
|
13 | declare function commondir(basedir: string, relativePaths: string[]): string;
|
14 | /**
|
15 | * Compute the closest common parent directory for an array relativePaths which will be resolved for each dir in
|
16 | * relativePaths according to: path.resolve(basedir, dir).
|
17 | *
|
18 | * @see \`{@link https://github.com/substack/node-commondir#commondirbasedir-relativepaths }\`
|
19 | */
|
20 | declare function commondir(absolutePaths: string[]): string;
|