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

x/cliffy/command.ts>BaseCommand#option

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
method BaseCommand.prototype.option
Re-export
import { BaseCommand } from "https://deno.land/x/cliffy@v0.6.0/command.ts";

Add new option (flag).

Parameters

flags: string

Flags string like: -h, --help, --manual requiredArg:string [optionalArg: number] [...restArgs:string]

desc: string

Flag description.

optional
value: IFlagValueHandler

Custom handler for processing flag value.

Add new option (flag).

Parameters

flags: string

Flags string like: -h, --help, --manual requiredArg:string [optionalArg: number] [...restArgs:string]

desc: string

Flag description.

optional
opts: ICommandOption

Flag options.