source: imaps-frontend/node_modules/path-key/index.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[d565449]1/// <reference types="node" />
2
3declare namespace pathKey {
4 interface Options {
5 /**
6 Use a custom environment variables object. Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env).
7 */
8 readonly env?: {[key: string]: string | undefined};
9
10 /**
11 Get the PATH key for a specific platform. Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform).
12 */
13 readonly platform?: NodeJS.Platform;
14 }
15}
16
17declare const pathKey: {
18 /**
19 Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform.
20
21 @example
22 ```
23 import pathKey = require('path-key');
24
25 const key = pathKey();
26 //=> 'PATH'
27
28 const PATH = process.env[key];
29 //=> '/usr/local/bin:/usr/bin:/bin'
30 ```
31 */
32 (options?: pathKey.Options): string;
33
34 // TODO: Remove this for the next major release, refactor the whole definition to:
35 // declare function pathKey(options?: pathKey.Options): string;
36 // export = pathKey;
37 default: typeof pathKey;
38};
39
40export = pathKey;
Note: See TracBrowser for help on using the repository browser.