import { type GlobalPromptOptions } from "https://deno.land/x/cliffy@v1.0.0-rc.1/prompt/prompt.ts";
Global prompt options used together with 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"],
};
Properties
optional
before: GlobalPromptMiddleware<TResult>optional
after: GlobalPromptMiddleware<TResult>optional
reader: GenericPromptOptions<unknown, unknown>["reader"]optional
writer: GenericPromptOptions<unknown, unknown>["writer"]optional
initial: keyof TResult extends infer U ? Extract<U, string> : never