Merge pull request #31460 from cspotcode/patch-5

[rc] Clarify `argv` and `parse` arguments
This commit is contained in:
Daniel Rosenwasser
2018-12-17 12:44:58 -08:00
committed by GitHub
+10 -1
View File
@@ -6,8 +6,17 @@
declare function rc(
name: string,
defaults?: any,
/**
* Parsed argv object. For example, if args is `--foo bar`, then this value should be `{foo: 'bar'}`
* If `argv` is `null` or `undefined`, then `rc`'s default parser will parse `process.argv`.
*/
argv?: {} | null,
/**
* Custom config file parser.
* This function will be passed the string contents of each
* discovered configuration file should return a parsed object dictionary.
*/
parse?: ((content: string) => any) | null
): any;
export = rc;
export = rc;