1declare 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 41declare 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 69export = envPaths; 70