Skip to main content
Module

x/flags/mod.ts>FlagDefine

Command line argument parser for deno and node.js
Latest
interface FlagDefine
import { type FlagDefine } from "https://deno.land/x/flags@0.0.3/mod.ts";

Properties

readonly
name: string
readonly
default: T
readonly
short: string
readonly
usage: string
readonly
optional
values: Array<T>
isValid: (v: T) => boolean
readonly
value: T

The value parsed by this flag

Methods

reset(): void

set value to default value

defaultString(): string

Returns a string description of the default value

valuesString(): string

Returns a string description of the list of valid values

add(val?: string): boolean

Parsed to this flag

isBool(): boolean

Returns whether it is a bool flag