Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/prompt/mod.ts>GlobalPromptOptions

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
interface GlobalPromptOptions
import { type GlobalPromptOptions } from "https://deno.land/x/cliffy@v1.0.0-rc.1/prompt/mod.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
cbreak: boolean
optional
reader: GenericPromptOptions<unknown, unknown>["reader"]
optional
writer: GenericPromptOptions<unknown, unknown>["writer"]
optional
initial: keyof TResult extends infer U ? Extract<U, string> : never