@types/app-root-path
TypeScript icon, indicating that this package has built-in type declarations

1.2.8 • Public • Published

Installation

npm install --save @types/app-root-path

Summary

This package contains type definitions for app-root-path (https://github.com/inxilpro/node-app-root-path).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/app-root-path.

index.d.ts

interface RootPath {
    /**
     * Application root directory absolute path
     */
    path: string;

    /**
     * Resolves relative path from root to absolute path
     * @param {string} pathToModule
     * @returns {string}
     */
    resolve(pathToModule: string): string;

    /**
     * Resolve module by relative addressing from root
     * @param {string} pathToModule
     * @returns {*}
     */
    require(pathToModule: string): any;

    /**
     * Explicitly set root path
     * @param {string} explicitlySetPath
     */
    setPath(explicitlySetPath: string): void;

    toString(): string;
}
declare const RootPath: RootPath;
export = RootPath;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Shant Marouti.

Dependents (106)

Package Sidebar

Install

npm i @types/app-root-path

Weekly Downloads

35,306

Version

1.2.8

License

MIT

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • types