(flag: string, description: string)
| 44 | }; |
| 45 | |
| 46 | function triStateBooleanOption(flag: string, description: string) { |
| 47 | return new Option(flag, description).choices(['true', 'false']).argParser((value) => { |
| 48 | if (value === undefined || value === 'true') return true; |
| 49 | if (value === 'false') return false; |
| 50 | throw new CliError(`Invalid value for ${flag}: ${value}`); |
| 51 | }); |
| 52 | } |
| 53 | |
| 54 | function createProgram() { |
| 55 | const program = new Command('zen') |