Skip to content

main

main(argv, env?, home?, io?): Promise<number>

env and home are injectable for the same reason loadConfig takes them: an integration test that let them default would read the developer’s own ~/.config/waypost/config.json and pass or fail according to what is in it. Nothing but a test ever passes them.

ParameterTypeDefault value
argvstring[]undefined
envRecord<string, string | undefined>process.env
homestring...
ioCliIoprocessIo

Promise<number>