MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / triStateBooleanOption

Function triStateBooleanOption

packages/cli/src/index.ts:46–52  ·  view source on GitHub ↗
(flag: string, description: string)

Source from the content-addressed store, hash-verified

44};
45
46function 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
54function createProgram() {
55 const program = new Command('zen')

Callers 1

createProgramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected