import { type PromptOptions } from "https://deno.land/x/cliffy@v1.0.0-rc.1/prompt/mod.ts";
Prompt options for the prompt()
method.
import { PromptOptions } from "./prompt.ts";
import { Checkbox } from "./checkbox.ts";
const options: PromptOptions<"color", typeof Checkbox> = {
name: "color",
message: "Select a color",
type: Checkbox,
options: ["red", "green", "blue"],
};
Type Parameters
TPrompt extends GenericPrompt<any, any> | StaticGenericPrompt<any, any>
definition: Id<TResult & PromptResult<TName, TPrompt>> extends infer Result ? { name: TName; before?: PromptMiddleware<Result>; after?: PromptMiddleware<Result>; } & (TPrompt extends GenericPrompt<any, any> ? (InferPromptOptions<TPrompt> & { type: StaticGenericPrompt<InferPromptValue<TPrompt>, InferPromptOptions<TPrompt>>; }) : TPrompt extends Checkbox ? (CheckboxOptions<unknown extends Value ? string : Value> & { type: TPrompt; }) : TPrompt extends Select ? (SelectOptions<unknown extends Value ? string : Value> & { type: TPrompt; }) : (Parameters<TPrompt["prompt"]>[0] & { type: TPrompt; })) : never