"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x86/node_modules/npm/node_modules/env-paths/index.d.ts" (18 Feb 2020, 1494 Bytes) of package /windows/www/node-v12.18.4-win-x86.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 declare namespace envPaths {
    2     export interface Options {
    3         /**
    4         __Don't use this option unless you really have to!__
    5 
    6         Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it.
    7 
    8         @default 'nodejs'
    9         */
   10         readonly suffix?: string;
   11     }
   12 
   13     export interface Paths {
   14         /**
   15         Directory for data files.
   16         */
   17         readonly data: string;
   18 
   19         /**
   20         Directory for data files.
   21         */
   22         readonly config: string;
   23 
   24         /**
   25         Directory for non-essential data files.
   26         */
   27         readonly cache: string;
   28 
   29         /**
   30         Directory for log files.
   31         */
   32         readonly log: string;
   33 
   34         /**
   35         Directory for temporary files.
   36         */
   37         readonly temp: string;
   38     }
   39 }
   40 
   41 declare const envPaths: {
   42     /**
   43     Get paths for storing things like data, config, cache, etc.
   44 
   45     @param name - Name of your project. Used to generate the paths.
   46     @returns The paths to use for your project on current OS.
   47 
   48     @example
   49     ```
   50     import envPaths = require('env-paths');
   51 
   52     const paths = envPaths('MyApp');
   53 
   54     paths.data;
   55     //=> '/home/sindresorhus/.local/share/MyApp-nodejs'
   56 
   57     paths.config
   58     //=> '/home/sindresorhus/.config/MyApp-nodejs'
   59     ```
   60     */
   61     (name: string, options?: envPaths.Options): envPaths.Paths;
   62 
   63     // TODO: Remove this for the next major release, refactor the whole definition to:
   64     // declare function envPaths(name: string, options?: envPaths.Options): envPaths.Paths;
   65     // export = envPaths;
   66     default: typeof envPaths;
   67 };
   68 
   69 export = envPaths;