@promptbook/wizard
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
11 lines (10 loc) • 491 B
TypeScript
/**
* Creates a Commander argument parser that accepts only positive integers.
*
* The returned parser is meant to be passed as the coercion callback of `command.option(...)`.
* It throws a branded `NotAllowed` error with a clear message referencing the given option name
* when the provided value is not a positive integer.
*
* @private internal utility of `promptbookCli`
*/
export declare function createPositiveIntegerOptionParser(optionName: string): (value: string) => number;