/** * Simplified, generic version of type required by `inquirer` for validation functions, which * inquirer does not export. */ export type ValidateFunction = (input: T) => true | string; /** * Simplified, generic version of type required by `inquirer` for transformer functions, which * inquirer does not export. */ export type TransformerFunction = (input: string, flags: { isFinal?: boolean | undefined; }) => string; export declare const displayNoneForEmpty: TransformerFunction; export type DefaultValueOrFn = T | (() => T); export type OptionalStringInputOptions = { default?: DefaultValueOrFn; validate?: ValidateFunction; helpText?: string; }; export declare const optionalStringInput: (message: string, options?: OptionalStringInputOptions) => Promise; export type StringInputOptions = Omit & { default?: DefaultValueOrFn; }; export declare const stringInput: (message: string, options?: StringInputOptions) => Promise; export type IntegerInputOptions = { default?: DefaultValueOrFn; /** * A validation function targeted at `inquirer`'s input method. For simple min/max validation, * use `numberValidateFn`. */ validate?: ValidateFunction; helpText?: string; }; /** * Prompt the user for an optional integer. The return value will always be a number that is an * integer or undefined. */ export declare const optionalIntegerInput: (message: string, options?: IntegerInputOptions) => Promise; /** * Simple wrapper around querying a user for a string. The return value will always be a string * which may be empty (unless a validation function is specified which disallows it). */ export declare const integerInput: (message: string, options?: IntegerInputOptions) => Promise; export type NumberInputOptions = { default?: DefaultValueOrFn; /** * A validation function targeted at `inquirer`'s prompt method. Note that `inquirer` input is * always a string, so this method gets the raw `string` entered by the user (not a `number`). * For simple min/max validation, use `integerValidateFn`. */ validate?: ValidateFunction; helpText?: string; }; export declare const internalNumberInput: (message: string, options: NumberInputOptions & { required: boolean; }) => Promise; export declare const optionalNumberInput: (message: string, options?: NumberInputOptions) => Promise; export declare const numberInput: (message: string, options?: NumberInputOptions) => Promise; export type BooleanInputOptions = { /** * Specify a default value for when the user hits enter. The default default is true. */ default?: boolean; }; export declare const booleanInput: (message: string, options?: BooleanInputOptions) => Promise; //# sourceMappingURL=user-query.d.ts.map