import type { Questionnair } from './types.js'; type AnswerValue = string | null; export interface AnswerFlag { /** * camelCase option name, passed as `--kebab-case` on the command line */ name: string; answer: keyof Questionnair; type: 'string' | 'boolean' | 'array'; desc: string; /** * CLI value → wizard answer value */ choices?: () => Record; } /** * Thrown for a flag value the wizard cannot use. The CLI prints the message * and exits with code 2, like any other usage error. */ export declare class AnswerFlagError extends Error { name: string; } /** * Every wizard question that can be answered from the command line. * `npm init wdio` and `wdio config` both read this list, so the flags and * their help text stay the same in both commands. */ export declare const ANSWER_FLAGS: AnswerFlag[]; /** * Help text for one flag, with the accepted values if it has a fixed set. */ export declare function describeAnswerFlag(flag: AnswerFlag): string; /** * Shared by the `--help` output of `npm init wdio` and `wdio config`. */ export declare const ANSWER_FLAGS_HELP: string; /** * yargs options for `wdio config`, keyed in kebab-case so `--help` shows the * flags as they are typed. yargs still sets the camelCase name on `argv`. * No defaults: a flag that is not passed leaves the question to the wizard * (or to `--yes`). */ export declare function getAnswerFlagYargsOptions(): Record; /** * Command line usage of a flag, e.g. `--runner ` or `--[no-]typescript`. */ export declare function answerFlagUsage(flag: AnswerFlag): string; /** * Turn parsed command line options into wizard answers. * Options that were not passed are left out, so the wizard still asks them. */ export declare function parseAnswerFlags(argv: Record): Partial; /** * Turn the options `create-wdio` received back into flags for `wdio config`. */ export declare function answerFlagsToArgs(argv: Record): string[]; /** * Check the answers given as flags against the finished questionnaire: every * flag has to belong to a question the wizard asks for this setup, and its * value has to be one the wizard offers there. */ export declare function assertAnswerFlagsApply(flagAnswers: Partial, answers: Questionnair): void; export {}; //# sourceMappingURL=answerFlags.d.ts.map