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

x/cliffy/command/mod.ts>Command#globalOption

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

Type Parameters

F extends string
G extends TypedOption<F, CO, Merge<CPT, Merge<CGT, CT>>, R, D>
MG extends MapValue<G, V, C>
optional
R extends ICommandOption["required"] = undefined
optional
C extends ICommandOption["collect"] = undefined
optional
D = undefined
optional
V = undefined

Parameters

flags: F
desc: string
optional
opts: Omit<ICommandGlobalOption<Partial<CO>, CA, MergeOptions<F, CG, G>, CPG, CT, CGT, CPT, CP>, "value"> & { default?: IDefaultValue<D>; required?: R; collect?: C; value?: IFlagValueHandler<MapTypes<ValueOf<G>>, V>; } | IFlagValueHandler<MapTypes<ValueOf<G>>, V>

Returns

Command<CPG, CPT, CO, CA, MergeOptions<F, CG, MG>, CT, CGT, CP>