UNPKG

1.56 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/app-root-path`
3
4# Summary
5This package contains type definitions for app-root-path (https://github.com/inxilpro/node-app-root-path).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/app-root-path.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/app-root-path/index.d.ts)
10````ts
11// Type definitions for app-root-path 1.2.1
12// Project: https://github.com/inxilpro/node-app-root-path
13// Definitions by: Shant Marouti <https://github.com/shantmarouti>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16interface RootPath {
17
18 /**
19 * Application root directory absolute path
20 */
21 path: string;
22
23 /**
24 * Resolves relative path from root to absolute path
25 * @param {string} pathToModule
26 * @returns {string}
27 */
28 resolve(pathToModule: string): string;
29
30 /**
31 * Resolve module by relative addressing from root
32 * @param {string} pathToModule
33 * @returns {*}
34 */
35 require(pathToModule: string): any;
36
37 /**
38 * Explicitly set root path
39 * @param {string} explicitlySetPath
40 */
41 setPath(explicitlySetPath: string): void;
42
43 toString(): string;
44}
45declare const RootPath: RootPath;
46export = RootPath;
47
48````
49
50### Additional Details
51 * Last updated: Sat, 29 Apr 2023 04:03:29 GMT
52 * Dependencies: none
53 * Global values: none
54
55# Credits
56These definitions were written by [Shant Marouti](https://github.com/shantmarouti).
57
\No newline at end of file