@cloud-copilot/cli
Version:
A standardized library for CLI building TypeScript CLI applications
15 lines • 710 B
TypeScript
import { Argument, PerArgumentArgs, ValidatedValues } from './argument.js';
type SingleValueValidator<ValueType> = (rawValue: string) => Promise<ValidatedValues<ValueType>> | ValidatedValues<ValueType>;
/**
* Creates a single value argument factory for a specific type
*/
export declare function singleValueArgument<ValueType>(validator: SingleValueValidator<ValueType>, descriptionSuffix?: string): {
<const O extends {
defaultValue: ValueType;
} & PerArgumentArgs>(options: O): Argument<ValueType>;
<const O extends {
defaultValue?: undefined;
} & PerArgumentArgs>(options: O): Argument<ValueType | undefined>;
};
export {};
//# sourceMappingURL=singleValueArgument.d.ts.map