Skip to content

Commit 27b6f44

Browse files
committed
Document CommandOptions.env
Functions which behave differently based on environment variables should pass the environment to allow caller control (without changing the global state) and to facilitate testing. Document this. Signed-off-by: Kevin Locke <[email protected]>
1 parent c32b69e commit 27b6f44

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bin/cmd.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ const modulename = require('..');
1515
/** Options for command entry points.
1616
*
1717
* @typedef {{
18+
* env: !object<string,string>,
1819
* stdin: !module:stream.Readable,
1920
* stdout: !module:stream.Writable,
2021
* stderr: !module:stream.Writable
2122
* }} CommandOptions
23+
* @property {!object<string,string>} env Environment variables.
2224
* @property {!module:stream.Readable} stdin Stream from which input is read.
2325
* @property {!module:stream.Writable} stdout Stream to which output is
2426
* written.

0 commit comments

Comments
 (0)