1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | declare namespace path {
|
7 | interface PathObject {
|
8 | root: string;
|
9 | dir: string;
|
10 | base: string;
|
11 | ext: string;
|
12 | name: string;
|
13 | }
|
14 |
|
15 | interface Path {
|
16 | resolve(...pathSegments: string[]): string;
|
17 | normalize(path: string): string;
|
18 | isAbsolute(path: string): boolean;
|
19 | join(...paths: string[]): string;
|
20 | relative(from: string, to: string): string;
|
21 | dirname(path: string): string;
|
22 | basename(path: string, ext?: string): string;
|
23 | extname(path: string): string;
|
24 | format(pathObject: Partial<PathObject>): string;
|
25 | parse(path: string): PathObject;
|
26 |
|
27 | readonly sep: string;
|
28 | readonly delimiter: string;
|
29 | readonly win32: null;
|
30 | readonly posix: Path;
|
31 | }
|
32 | }
|
33 |
|
34 | declare const path: path.Path;
|
35 | export = path;
|