dominictarr/rc

Docs for custom argv and config file parsers are lacking

cspotcode opened this issue · 0 comments

From the readme, it's unclear the role and interface for the third and fourth arguments to rc.

https://github.com/dominictarr/rc#pass-in-your-own-argv

These declarations made it a bit clearer: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/rc/index.d.ts#L6-L11

Is the third argument expected to be a object dictionary or a function that parses the argv array? The readme suggests it's the latter, so if that's not supported then I think customArgvParser could be renamed.

Is the fourth argument a function that accepts the string contents of a config file and returns an object dictionary?