Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denomander/src/CustomOption.ts>default

Deno command-line interfaces made easy
Latest
class default
import { default } from "https://deno.land/x/denomander@0.9.3/src/CustomOption.ts";

Class that only handles the custom option form the user (it is not used but it reasign the proper Option object)

Constructors

new
default(params: CommandOption)

Constructor of Command object

Properties

protected
optional
_letter_option: string

Holds the short flag (-p). One letter command

protected
_word_option: string

Holds the long flag (--port). One letter command

optional
_callback: Function

The custom option processing function

_description: string

The description of the option

_flags: string

Holds the flags as defined (unparsed)

_isRequired: boolean

If the option is required

optional
all_choices: Array<any>
optional
defaultValue: any

Holds the default value if passed

Methods

callback(callback: Function): CustomOption
choices(choices: Array<any>): CustomOption
default(defaultValue: any): CustomOption

Set the default value if not setted in constructor

description(description: string): CustomOption
flags(flags: string): CustomOption
isRequired(isRequired: boolean): CustomOption